end
This commit is contained in:
@@ -22,38 +22,28 @@ function runTsFile(filePath: string): Promise<void> {
|
||||
});
|
||||
}
|
||||
|
||||
// 10시에 실행 - fetch-articles.ts 실행 후 app.ts 실행
|
||||
schedule.scheduleJob("0 0 10 * * *", async () => {
|
||||
console.log("Running parserLandList.ts at 10:00 AM");
|
||||
// 11시에 실행 - fetch-articles -> fetch-detailAddress -> updateRanging -> sendTelegram
|
||||
schedule.scheduleJob("0 11 * * *", async () => {
|
||||
console.log("Running scheduled jobs at 11 AM");
|
||||
try {
|
||||
await runTsFile("./fetch-articles.ts");
|
||||
// fetch-articles.ts 완료 후 app.ts 실행
|
||||
await runTsFile("./fetch-detailAddress.ts");
|
||||
await runTsFile("./updateRanging.ts");
|
||||
await runTsFile("./sendTelegram.ts");
|
||||
} catch (error) {
|
||||
console.error("Error in scheduled job:", error);
|
||||
console.error("Error in 11 AM scheduled job:", error);
|
||||
}
|
||||
});
|
||||
|
||||
// 11시에 실행
|
||||
schedule.scheduleJob("0 11 * * *", () => {
|
||||
console.log("Running app.ts at 11 AM");
|
||||
runTsFile("./app.ts");
|
||||
});
|
||||
|
||||
// 15시에 실행 - fetch-articles.ts 실행 후 app.ts 실행
|
||||
schedule.scheduleJob("0 0 15 * * *", async () => {
|
||||
console.log("Running parserLandList.ts at 3:00 PM");
|
||||
// 16시에 실행 - fetch-articles -> fetch-detailAddress -> updateRanging -> sendTelegram
|
||||
schedule.scheduleJob("0 16 * * *", async () => {
|
||||
console.log("Running scheduled jobs at 4 PM");
|
||||
try {
|
||||
await runTsFile("./fetch-articles.ts");
|
||||
// fetch-articles.ts 완료 후 app.ts 실행
|
||||
await runTsFile("./fetch-detailAddress.ts");
|
||||
await runTsFile("./updateRanging.ts");
|
||||
await runTsFile("./sendTelegram.ts");
|
||||
} catch (error) {
|
||||
console.error("Error in scheduled job:", error);
|
||||
console.error("Error in 4 PM scheduled job:", error);
|
||||
}
|
||||
});
|
||||
|
||||
// 16시에 실행
|
||||
schedule.scheduleJob("0 16 * * *", () => {
|
||||
console.log("Running app.ts at 4 PM");
|
||||
runTsFile("./app.ts");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user