You are here

public function JobScheduler::remove in Job Scheduler 7

Same name and namespace in other branches
  1. 6 JobScheduler.inc \JobScheduler::remove()
  2. 7.2 JobScheduler.inc \JobScheduler::remove()

Remove a job from the schedule, replace any existing job.

A job is uniquely identified by $job = array(type, id).

2 calls to JobScheduler::remove()
JobScheduler::dispatch in ./JobScheduler.inc
Dispatches a job.
JobScheduler::set in ./JobScheduler.inc
Add a job to the schedule, replace any existing job.

File

./JobScheduler.inc, line 109
JobScheduler class.

Class

JobScheduler
Manage scheduled jobs.

Code

public function remove($job) {
  db_delete('job_schedule')
    ->condition('name', $this->name)
    ->condition('type', $job['type'])
    ->condition('id', isset($job['id']) ? $job['id'] : 0)
    ->execute();
}