changing the cron to be every day at 10 am

This commit is contained in:
Kfir Dayan 2024-02-04 13:40:17 +02:00
parent 486f334b4a
commit 3fef736821
2 changed files with 4 additions and 4 deletions

4
dist/index.js vendored
View file

@ -57,8 +57,8 @@ class App {
} }
} }
const app = new App(); const app = new App();
node_cron_1.default.schedule('* * * * *', () => { node_cron_1.default.schedule('0 10 * * *', () => {
console.log('Running startCronJob at 7:00 AM Jerusalem time'); console.log('Running startCronJob at 10:00 AM Jerusalem time');
app.startCronJob().catch((error) => { app.startCronJob().catch((error) => {
console.error("Error in scheduled cron job:", error.message); console.error("Error in scheduled cron job:", error.message);
app.writeLog(`ERROR: ${error.message}`); // Log any errors app.writeLog(`ERROR: ${error.message}`); // Log any errors

View file

@ -64,8 +64,8 @@ class App {
const app = new App(); const app = new App();
cron.schedule('* * * * *', () => { cron.schedule('0 10 * * *', () => {
console.log('Running startCronJob at 7:00 AM Jerusalem time'); console.log('Running startCronJob at 10:00 AM Jerusalem time');
app.startCronJob().catch((error) => { app.startCronJob().catch((error) => {
console.error("Error in scheduled cron job:", error.message); console.error("Error in scheduled cron job:", error.message);
app.writeLog(`ERROR: ${error.message}`); // Log any errors app.writeLog(`ERROR: ${error.message}`); // Log any errors