diff --git a/smash/web/importer/exporter_cron_job.py b/smash/web/importer/exporter_cron_job.py index 90ce95a604070e873332ec0c8610180808694ece..1d6d76822b6d9bf3911b9e7ba97397421be697ac 100644 --- a/smash/web/importer/exporter_cron_job.py +++ b/smash/web/importer/exporter_cron_job.py @@ -14,8 +14,8 @@ logger = logging.getLogger(__name__) class ExporterCronJob(CronJobBase): - RUN_EVERY_MINUTES = 60 * 24 - schedule = Schedule(run_every_mins=RUN_EVERY_MINUTES) + RUN_AT_TIMES = getattr(settings, "EXPORT_RUN_AT", ['23:55']) + schedule = Schedule(run_at_times=RUN_AT_TIMES) code = 'web.import_daily_job' # a unique code @timeout_decorator.timeout(CRON_JOB_TIMEOUT) diff --git a/smash/web/importer/importer_cron_job.py b/smash/web/importer/importer_cron_job.py index 36df103ae0e3442b83549020bfee058a8e5dd634..ef0bfd123cc493d004298edd52b3c5b641abae36 100644 --- a/smash/web/importer/importer_cron_job.py +++ b/smash/web/importer/importer_cron_job.py @@ -18,7 +18,7 @@ logger = logging.getLogger(__name__) class ImporterCronJob(CronJobBase): - RUN_AT_TIMES = ['23:55'] + RUN_AT_TIMES = getattr(settings, "IMPORT_RUN_AT", ['23:55']) schedule = Schedule(run_at_times=RUN_AT_TIMES) code = 'web.import_daily_job' # a unique code