mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 01:39:52 +08:00
feat: harden cron execution recovery and expose scheduling diagnostics
Reconcile scheduled and system cron triggers, isolate concurrent executions and retain verifiable exit statistics across restarts. Add paged task history, log and script browsing, dashboard timing details and regression coverage.
This commit is contained in:
1 parent
3b6a873520
commit
8a9e70e90b
166 files changed
+18942
-1800
No files matched your search
@@ -1,7 +1,5 @@
|
||||
import intl from 'react-intl-universal';
|
||||
import { LANG_MAP, LOG_END_SYMBOL } from './const';
|
||||
import CronExpressionParser from 'cron-parser';
|
||||
import { ICrontab } from '@/pages/crontab/type';
|
||||
|
||||
export default function browserType() {
|
||||
// 权重:系统 + 系统版本 > 平台 > 内核 + 载体 + 内核版本 + 载体版本 > 外壳 + 外壳版本
|
||||
@@ -335,33 +333,6 @@ export function getCommandScript(
|
||||
return [s, p];
|
||||
}
|
||||
|
||||
export function parseCrontab(schedule: string): Date | null {
|
||||
try {
|
||||
const time = CronExpressionParser.parse(schedule);
|
||||
if (time) {
|
||||
return time.next().toDate();
|
||||
}
|
||||
} catch (error) {}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export function getCrontabsNextDate(
|
||||
schedule: string,
|
||||
extra_schedules: ICrontab['extra_schedules'],
|
||||
): Date | null {
|
||||
let date = parseCrontab(schedule);
|
||||
if (extra_schedules?.length) {
|
||||
extra_schedules.forEach((x) => {
|
||||
const _date = parseCrontab(x.schedule);
|
||||
if (_date && (!date || _date < date)) {
|
||||
date = _date;
|
||||
}
|
||||
});
|
||||
}
|
||||
return date;
|
||||
}
|
||||
|
||||
export function getExtension(filename: string) {
|
||||
if (!filename) return '';
|
||||
const arr = filename.split('.');
|
||||
|
||||
Reference in new issue
Block a user