From 77d9ff033af3b49ab950371d971adb358a419214 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Apr 2018 15:06:30 +0200 Subject: [PATCH] FIX cron script disabled if module disabled --- scripts/cron/cron_run_jobs.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index 246fd3d75b4..5113e5971b0 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -75,6 +75,13 @@ $now=dol_now(); @set_time_limit(0); print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." ***** userlogin=" . $userlogin . " ***** " . $now . " *****\n"; +// Check module cron is activated +if (empty($conf->cron->enabled)) +{ + print "Error: module Scheduled jobs (cron) not activated\n"; + exit(-1); +} + // Check security key if ($key != $conf->global->CRON_KEY) {