1
This commit is contained in:
@@ -4,9 +4,9 @@ import { execute_action_and_record } from './task_executor.js';
|
||||
|
||||
const cron_jobs = [];
|
||||
|
||||
export function start_all_cron_tasks() {
|
||||
export async function start_all_cron_tasks() {
|
||||
for (const task of cron_task_list) {
|
||||
const job = cron.schedule(task.cron_expression, async () => {
|
||||
// const job = cron.schedule(task.cron_expression, async () => {
|
||||
try {
|
||||
await execute_action_and_record({
|
||||
action_name: task.action_name,
|
||||
@@ -16,9 +16,9 @@ export function start_all_cron_tasks() {
|
||||
} catch (err) {
|
||||
// 失败会在 crawl_run_record 落库
|
||||
}
|
||||
});
|
||||
// });
|
||||
|
||||
cron_jobs.push(job);
|
||||
// cron_jobs.push(job);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user