generated from template/slidev-template
update
This commit is contained in:
11
agent/corn.ts
Normal file
11
agent/corn.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import cron from 'node-cron';
|
||||
import './index.ts'
|
||||
import { main } from './task.ts';
|
||||
|
||||
// 每2个小时执行一次更新任务
|
||||
cron.schedule('0 */2 * * *', async () => {
|
||||
main()
|
||||
});
|
||||
|
||||
// first run
|
||||
main()
|
||||
Reference in New Issue
Block a user