equal
deleted
inserted
replaced
27 // Hope now that plugins are loaded :-) |
27 // Hope now that plugins are loaded :-) |
28 global $cron_tasks; |
28 global $cron_tasks; |
29 |
29 |
30 foreach ( $cron_tasks as $interval => $tasks ) |
30 foreach ( $cron_tasks as $interval => $tasks ) |
31 { |
31 { |
|
32 $interval = doubleval($interval); |
32 $last_run = intval(getConfig("cron_lastrun_ivl_$interval")); |
33 $last_run = intval(getConfig("cron_lastrun_ivl_$interval")); |
33 $last_run_threshold = time() - ( 3600 * $interval ); |
34 $last_run_threshold = doubleval(time()) - ( 3600.0 * $interval ); |
34 if ( $last_run_threshold >= $last_run ) |
35 if ( $last_run_threshold >= $last_run ) |
35 { |
36 { |
36 foreach ( $tasks as $task ) |
37 foreach ( $tasks as $task ) |
37 { |
38 { |
38 @call_user_func($task); |
39 @call_user_func($task); |