You are here

public function Cron::removeTask in Anti Spam by CleanTalk 8.4

Same name and namespace in other branches
  1. 9.1.x src/lib/Cleantalk/Common/Cron.php \Cleantalk\Common\Cron::removeTask()

Removing cron task

Parameters

string $task:

Return value

bool

1 call to Cron::removeTask()
Cron::updateTask in src/lib/Cleantalk/Common/Cron.php
Updates cron task, create task if not exists.

File

src/lib/Cleantalk/Common/Cron.php, line 123

Class

Cron
CleanTalk Cron class

Namespace

Cleantalk\Common

Code

public function removeTask($task) {
  if (!isset($this->tasks[$task])) {
    return false;
  }
  unset($this->tasks[$task]);
  return $this
    ->saveTasks($this->tasks);
}