add entry
This commit is contained in:
parent
c6829ed14f
commit
30c785dc3c
5 changed files with 174 additions and 3 deletions
|
|
@ -40,7 +40,7 @@ async function main() {
|
|||
const APP_HOST = process.env.APP_HOST || "0.0.0.0";
|
||||
const APP_PORT = +(process.env.APP_PORT || 3000);
|
||||
|
||||
const cronTime = "0 8 * * * *"; // ตั้งเวลาทุกวันเวลา 08:00:00
|
||||
const cronTime = "0 0 3 * * *"; // ตั้งเวลาทุกวันเวลา 08:00:00
|
||||
// const cronTime = "*/10 * * * * *";
|
||||
cron.schedule(cronTime, async () => {
|
||||
try {
|
||||
|
|
@ -51,12 +51,13 @@ async function main() {
|
|||
}
|
||||
});
|
||||
|
||||
const cronTime_command = "0 2 * * * *";
|
||||
const cronTime_command = "0 0 2 * * *";
|
||||
// const cronTime_command = "*/10 * * * * *";
|
||||
cron.schedule(cronTime_command, async () => {
|
||||
try {
|
||||
const commandController = new CommandController();
|
||||
await commandController.cronjobCommand();
|
||||
await commandController.cronjobTest();
|
||||
} catch (error) {
|
||||
console.error("Error executing function from controller:", error);
|
||||
}
|
||||
|
|
@ -72,7 +73,7 @@ async function main() {
|
|||
}
|
||||
});
|
||||
|
||||
const cronTime_Tenure = "0 0 * * *";
|
||||
const cronTime_Tenure = "0 0 0 * * *";
|
||||
cron.schedule(cronTime_Tenure, async () => {
|
||||
try {
|
||||
const profileSalaryController = new ProfileSalaryController();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue