You are here

public function UltimateCronJob::unlock in Ultimate Cron 7.2

Unlock job.

Parameters

string $lock_id: The lock id to unlock.

bool $manual: Whether or not this is a manual unlock.

File

./ultimate_cron.job.inc, line 431
Job class for Ultimate Cron.

Class

UltimateCronJob
Class for handling cron jobs.

Code

public function unlock($lock_id = NULL, $manual = FALSE) {
  $result = NULL;
  if (!$lock_id) {
    $lock_id = $this
      ->isLocked();
  }
  if ($lock_id) {
    $result = $this
      ->getPlugin('launcher')
      ->unlock($lock_id, $manual);
  }
  $this
    ->sendMessage('unlock', array(
    'lock_id' => $lock_id,
  ));
  return $result;
}