Issue 5467: Cron jobs hadn't been executed

This commit is contained in:
Michael 2018-07-24 06:15:58 +00:00
parent f2b97f9320
commit 432eec770b
2 changed files with 4 additions and 4 deletions

View File

@ -11,8 +11,8 @@ use Friendica\Core\Config;
use Friendica\Core\Worker; use Friendica\Core\Worker;
// Get options // Get options
$shortopts = 'sc'; $shortopts = 'sn';
$longopts = ['spawn', 'cron']; $longopts = ['spawn', 'no_cron'];
$options = getopt($shortopts, $longopts); $options = getopt($shortopts, $longopts);
// Ensure that worker.php is executed from the base path of the installation // Ensure that worker.php is executed from the base path of the installation
@ -52,7 +52,7 @@ if ($spawn) {
killme(); 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); Worker::processQueue($run_cron);

View File

@ -1011,7 +1011,7 @@ class Worker
{ {
$command = 'bin/worker.php'; $command = 'bin/worker.php';
$args = [ 'cron' => $do_cron ]; $args = ['no_cron' => !$do_cron];
get_app()->proc_run($command, $args); get_app()->proc_run($command, $args);