fetchObject(); $num_waiting_jobs = $waiting_jobs->count; $job_ids = explode('|', $waiting_jobs->jobs); // If there are then run them and log the output. if ($num_waiting_jobs > 0) { $this->log($num_waiting_jobs . ' Waiting Tripal Jobs... ' . 'Running waiting job(s) now.'); // Launch all tripal jobs :) Yay for bootstrapping!! foreach ($job_ids as $id) { $this->log('Starting Job (ID=' . $id . ')', '', 1); tripal_launch_job(FALSE, $id); // Report job details. $job = db_query( "SELECT j.* FROM {tripal_jobs} j WHERE j.job_id = :jid", array(':jid' => $id) )->fetchObject(); $this->log("Job completed at " . date('d M Y H:i:s', $job->end_time) . " with a status of '" . $job->status . "'", "", 1); } } else { $this->log('There are no Tripal Jobs to run'); } } }