Commit e61ddaa4 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix cron for initial installs with no nextrun time


Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent 37946000
......@@ -58,7 +58,7 @@ foreach (plugin_types() as $plugintype) {
$now = $fake ? (time() - ($realstart - $start)) : time();
$jobs = get_records_select_array(
$table,
'nextrun < ?',
'nextrun < ? OR nextrun IS NULL',
array(db_format_timestamp($now)),
'',
'plugin,callfunction,minute,hour,day,month,dayofweek,' . db_format_tsfield('nextrun')
......@@ -118,7 +118,7 @@ foreach (plugin_types() as $plugintype) {
$now = $fake ? (time() - ($realstart - $start)) : time();
$jobs = get_records_select_array(
'cron',
'nextrun < ?',
'nextrun < ? OR nextrun IS NULL',
array(db_format_timestamp($now)),
'',
'id,callfunction,minute,hour,day,month,dayofweek,' . db_format_tsfield('nextrun')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment