You are here

public function CronJob::setProgress in Ultimate Cron 8.2

Set job progress.

Parameters

float $progress: The progress (0 - 1).

Overrides CronJobInterface::setProgress

File

src/Entity/CronJob.php, line 664

Class

CronJob
Class for handling cron jobs.

Namespace

Drupal\ultimate_cron\Entity

Code

public function setProgress($progress) {
  if ($this
    ->getPlugin('launcher')
    ->setProgress($this, $progress)) {
    $this
      ->sendMessage('setProgress', array(
      'progress' => $progress,
    ));
    return TRUE;
  }
  return FALSE;
}