function ultimate_cron_get_log in Ultimate Cron 6
Same name and namespace in other branches
- 8 ultimate_cron.module \ultimate_cron_get_log()
- 7 ultimate_cron.module \ultimate_cron_get_log()
Get latest log line for a function.
Parameters
$name: Function to get latest log line for,
Return value
object Log line.
6 calls to ultimate_cron_get_log()
- drush_ultimate_cron_cron_list in ./
ultimate_cron.drush.inc - List cron jobs.
- drush_ultimate_cron_cron_run in ./
ultimate_cron.drush.inc - Run cron job(s)
- ultimate_cron_load_hook_data in ./
ultimate_cron.module - Populate hook array with settings and log data
- ultimate_cron_nagios_get_job_info in ./
ultimate_cron.nagios.inc - Get information about running jobs - currently running or failed.
- ultimate_cron_view_page in ./
ultimate_cron.admin.inc - Page overviewing cron jobs.
File
- ./
ultimate_cron.module, line 1190 - @todo Add filter on overview page. @todo Add log view (with graph). @todo Make proper markup for overview page. @todo Refactor drush stuff, too many intimate relations with Background Process @todo Refactor Cron % offset stuff. Too mixed up and…
Code
function ultimate_cron_get_log($name) {
$log = db_fetch_array(db_query_range("\n SELECT l.* FROM {ultimate_cron_log} l\n WHERE l.name = '%s'\n ORDER BY l.start_stamp DESC", $name, 0, 1));
if ($log) {
$log['start'] = $log['start_stamp'];
$log['status'] = $log['exec_status'];
$log['end'] = $log['end_stamp'];
}
return $log;
}