feat: add daily cron scheduler for price checks

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Sjoerd de Vries
2026-09-05 15:15:09 +02:00
parent 68cb8d0c08
commit 3b0e824c5b
2 changed files with 31 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
const cronDefault = require('node-cron');
const SCHEDULE = '0 8 * * *';
const TIMEZONE = 'Europe/Amsterdam';
function start(runCheck, { cron = cronDefault } = {}) {
return cron.schedule(SCHEDULE, runCheck, { timezone: TIMEZONE });
}
module.exports = { start, SCHEDULE, TIMEZONE };