This commit is contained in:
parent
713b67a52c
commit
275160f3ae
@ -1,7 +1,6 @@
|
|||||||
import { scheduleJob } from "node-schedule"
|
import { scheduleJob } from "node-schedule"
|
||||||
|
|
||||||
import manageRobot from "../controllers/manageRobot"
|
import manageRobot from "../controllers/manageRobot"
|
||||||
import monitorJob from "./monitorJob"
|
|
||||||
import syncPipeLine from "./syncPipeLine"
|
import syncPipeLine from "./syncPipeLine"
|
||||||
|
|
||||||
const initSchedule = async () => {
|
const initSchedule = async () => {
|
||||||
@ -9,12 +8,12 @@ const initSchedule = async () => {
|
|||||||
scheduleJob("0 10 * * 5", manageRobot.sendCIReportByCron)
|
scheduleJob("0 10 * * 5", manageRobot.sendCIReportByCron)
|
||||||
// 每15分钟同步一次CI数据
|
// 每15分钟同步一次CI数据
|
||||||
scheduleJob("*/15 * * * *", syncPipeLine)
|
scheduleJob("*/15 * * * *", syncPipeLine)
|
||||||
// 每30秒执行一次监控任务
|
// // 每30秒执行一次监控任务
|
||||||
scheduleJob("*30 * * * * *", monitorJob)
|
// scheduleJob("*30 * * * * *", monitorJob)
|
||||||
// 立即同步一次
|
// 立即同步一次
|
||||||
syncPipeLine()
|
syncPipeLine()
|
||||||
// 立即执行一次监控任务
|
// // 立即执行一次监控任务
|
||||||
monitorJob()
|
// monitorJob()
|
||||||
}
|
}
|
||||||
|
|
||||||
export default initSchedule
|
export default initSchedule
|
||||||
|
Loading…
x
Reference in New Issue
Block a user