You are here

public function Cron::setCronLastStart in Anti Spam by CleanTalk 9.1.x

Same name in this branch
  1. 9.1.x src/lib/Cleantalk/Common/Cron.php \Cleantalk\Common\Cron::setCronLastStart()
  2. 9.1.x src/lib/Cleantalk/ApbctDrupal/Cron.php \Cleantalk\ApbctDrupal\Cron::setCronLastStart()
Same name and namespace in other branches
  1. 8.4 src/lib/Cleantalk/ApbctDrupal/Cron.php \Cleantalk\ApbctDrupal\Cron::setCronLastStart()

Save timestamp of running Cron.

Return value

bool

Overrides Cron::setCronLastStart

File

src/lib/Cleantalk/ApbctDrupal/Cron.php, line 39

Class

Cron

Namespace

Cleantalk\ApbctDrupal

Code

public function setCronLastStart() {
  \Drupal::state()
    ->set($this->cron_option_name, array(
    'last_start' => time(),
    'tasks' => $this
      ->getTasks(),
  ));
  return true;
}