Пример #1
0
 public function process()
 {
     $id = $this->getProperty('id');
     if (!$id) {
         return $this->failure('No job ID given');
     }
     $this->job = $this->modx->getObject('modCronjob', $id);
     if (!$this->job || !$this->job instanceof modCronjob) {
         return $this->failure('Job not found, sorry');
     }
     $this->executeJob();
     return $this->success('', $this->job->display());
 }