Crontab\Crontab::removeJob PHP Method

removeJob() public method

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

Usage Example

Beispiel #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