You are here

public function JobScheduler::removeAll in Job Scheduler 8.2

Same name and namespace in other branches
  1. 8.3 src/JobScheduler.php \Drupal\job_scheduler\JobScheduler::removeAll()

Removes all jobs for a given type.

Parameters

string $name: Name of the schedule.

string $type: The job type to remove.

Throws

\Exception Exceptions thrown by code called by this method are passed on.

Overrides JobSchedulerInterface::removeAll

File

src/JobScheduler.php, line 97

Class

JobScheduler
Manage scheduled jobs.

Namespace

Drupal\job_scheduler

Code

public function removeAll($name, $type) {
  $this->database
    ->delete('job_schedule')
    ->condition('name', $name)
    ->condition('type', $type)
    ->execute();
}