From 432eec770b7f2ec6128f70534489025207f26a13 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 24 Jul 2018 06:15:58 +0000 Subject: [PATCH] Issue 5467: Cron jobs hadn't been executed --- bin/worker.php | 6 +++--- src/Core/Worker.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/worker.php b/bin/worker.php index d821fe626a..f8900f3ca3 100755 --- a/bin/worker.php +++ b/bin/worker.php @@ -11,8 +11,8 @@ use Friendica\Core\Config; use Friendica\Core\Worker; // Get options -$shortopts = 'sc'; -$longopts = ['spawn', 'cron']; +$shortopts = 'sn'; +$longopts = ['spawn', 'no_cron']; $options = getopt($shortopts, $longopts); // Ensure that worker.php is executed from the base path of the installation @@ -52,7 +52,7 @@ if ($spawn) { killme(); } -$run_cron = array_key_exists('c', $options) || array_key_exists('cron', $options); +$run_cron = !array_key_exists('n', $options) && !array_key_exists('no_cron', $options); Worker::processQueue($run_cron); diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 1de4d3b953..9dd973728d 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -1011,7 +1011,7 @@ class Worker { $command = 'bin/worker.php'; - $args = [ 'cron' => $do_cron ]; + $args = ['no_cron' => !$do_cron]; get_app()->proc_run($command, $args); -- 2.39.5