From 40d18331542e8bfab73006cf5ae3ef6be49cc90e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Oct 2022 12:19:41 +0200 Subject: [PATCH] Prepare support of --force option on crons --- scripts/cron/cron_run_jobs.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index ee866203665..1d95a745e1c 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -164,6 +164,10 @@ $user->getrights(); if (isset($argv[3]) && $argv[3]) { $id = $argv[3]; } +$forcequalified = 0; +if (isset($argv[4]) && $argv[4] == '--force') { + $forcequalified = 1; +} // create a jobs object $object = new Cronjob($db); @@ -313,7 +317,7 @@ exit(0); */ function usage($path, $script_file) { - print "Usage: ".$script_file." securitykey userlogin|'firstadmin' [cronjobid]\n"; + print "Usage: ".$script_file." securitykey userlogin|'firstadmin' [cronjobid] [--force]\n"; print "The script return 0 when everything worked successfully.\n"; print "\n"; print "On Linux system, you can have cron jobs ran automatically by adding an entry into cron.\n";