Crontab\Crontab::removeJob PHP 메소드

removeJob() 공개 메소드

Remove a specified job in the current crontab
public removeJob ( Crontab\Job $job ) : Crontab
$job Crontab\Job
리턴 Crontab
    public function removeJob(Job $job)
    {
        unset($this->jobs[$job->getHash()]);
        return $this;
    }

Usage Example

예제 #1
0
 /**
  * Delete tasks by ids.
  * 
  * @param mixed $ids could either be an array of ids or a single id
  * @return $this
  */
 public function delete($ids)
 {
     if (is_array($ids)) {
         $this->deleteByIds($ids);
     } else {
         $job = $this->find($ids);
         if ($job instanceof Job) {
             $this->crontab->removeJob($job);
         }
     }
     return $this;
 }
All Usage Examples Of Crontab\Crontab::removeJob