diff --git a/app/workers/reeeper.js b/app/workers/reeeper.js index 91f1890..4e0d299 100644 --- a/app/workers/reeeper.js +++ b/app/workers/reeeper.js @@ -17,8 +17,6 @@ const { const { CronJob } = require('cron'); -const CRON_TIMEZONE = 'America/New_York'; - module.rootPath = path.resolve(__dirname, '..', '..'); module.pkg = require(path.resolve(__dirname, '..', '..', 'package.json')); @@ -38,7 +36,9 @@ class ReeeperWorker extends SiteWorker { } async start ( ) { + const CRON_TIMEZONE = 'America/New_York'; await super.start(); + await this.expireCrashedHosts(); // first-run the expirations this.expireJob = new CronJob('*/5 * * * * *', this.expireCrashedHosts.bind(this), null, true, CRON_TIMEZONE); }