/**
  * Redirect the user to the appropriate Backend module (job).
  */
 public function showMainEditJobData()
 {
     $job = CronJobQuery::create()->findPk($_GET['item']);
     $url = url('', array('module' => $job->getJobClass()));
     if ($job->getModuleView()) {
         $url->add(array('view' => $job->getModuleView()));
     }
     $url->redirect();
     exit;
 }
Exemplo n.º 2
0
 protected function getQueuedJobs()
 {
     $jobs = CronJobQuery::create()->joinWithCronJobSchedule()->filterByActive(true)->filterByType('cron')->find();
     $ret = clone $jobs;
     foreach ($jobs as $key => $job) {
         $cron = CronExpression::factory($this->getCronExpression($job));
         if (!$cron->isDue($this->now)) {
             $ret->remove($key);
         }
         unset($cron);
     }
     unset($jobs);
     return $ret;
 }
Exemplo n.º 3
0
 protected function getQueuedJobs()
 {
     return CronJobQuery::create()->filterByActive(true)->filterByType('job')->find();
 }