You are here

public function Cron::updateTask 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::updateTask()

Updates cron task, create task if not exists.

Parameters

string $task:

string $handler:

int $period:

null|int $first_call:

array $params:

Return value

bool

File

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

Class

Cron
CleanTalk Cron class

Namespace

Cleantalk\Common

Code

public function updateTask($task, $handler, $period, $first_call = null, $params = array()) {
  $this
    ->removeTask($task);
  return $this
    ->addTask($task, $handler, $period, $first_call, $params);
}