Record run time of scheduled job

This commit is contained in:
Nathan Gray 2012-02-02 17:16:55 +00:00
parent 38076211cc
commit a18c32c824

View File

@ -151,6 +151,7 @@
if(is_array($async[$id]['data'])) {
$data += $async[$id]['data'];
$data['schedule'] = $async[$id]['times'];
unset($data['times']);
// Async sometimes changes minutes to an array - show user what they typed
if(is_array($data['schedule']['min'])) $data['schedule']['min'] = $data['min'];
@ -519,6 +520,9 @@
}
}
// Run time in minutes
$data['run_time'] = (time() - $data['last_run']) / 60;
// Update job with results
self::update_job($data);