refactor(ui): clean code

This commit is contained in:
Fu Diwei
2024-12-25 23:20:09 +08:00
parent adbf40914e
commit 1184e52ba9
30 changed files with 267 additions and 233 deletions

View File

@@ -10,6 +10,8 @@ export const validCronExpression = (expr: string): boolean => {
};
export const getNextCronExecutions = (expr: string, times = 1): Date[] => {
if (!expr) return [];
try {
const now = new Date();
const cron = parseExpression(expr, { currentDate: now, iterator: true });