diff --git a/start/scheduler.ts b/start/scheduler.ts index 82ab9da..be06d86 100644 --- a/start/scheduler.ts +++ b/start/scheduler.ts @@ -1,6 +1,7 @@ import { CronJob } from 'cron' import app from '@adonisjs/core/services/app' +import env from '#start/env' import { PackagesDataRefresher } from '#services/packages_data_refresher' /** @@ -11,5 +12,5 @@ CronJob.from({ start: true, cronTime: '0 */3 * * *', onTick: () => refresher.refresh(), - runOnInit: app.inProduction, + runOnInit: !!env.get('GITHUB_TOKEN') || app.inProduction, })