]> git.mxchange.org Git - friendica.git/commitdiff
Issue 5467: Cron jobs hadn't been executed
authorMichael <heluecht@pirati.ca>
Tue, 24 Jul 2018 06:15:58 +0000 (06:15 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 24 Jul 2018 06:15:58 +0000 (06:15 +0000)
bin/worker.php
src/Core/Worker.php

index d821fe626a6b47183ed6937df97544f385af8b33..f8900f3ca32417725b05337195907ef5f644a6d1 100755 (executable)
@@ -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);
 
index 1de4d3b953414319548ac13ffdbad3f1eb906deb..9dd973728dcbfb6c8256883d538c624e62b50855 100644 (file)
@@ -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);