You are here

public function SchedulingState::getNextScheduledTime in Webform Scheduled Tasks 8.2

Get the next time a task is scheduled to run.

Parameters

\Drupal\webform_scheduled_tasks\Entity\WebformScheduledTaskInterface $scheduledTask: The scheduled task.

Return value

int|null The timestamp for the next scheduled time the task should run.

Overrides SchedulingStateInterface::getNextScheduledTime

File

src/SchedulingState.php, line 58

Class

SchedulingState
Get information about the state of task scheduling.

Namespace

Drupal\webform_scheduled_tasks

Code

public function getNextScheduledTime(WebformScheduledTaskInterface $scheduledTask) {
  $scheduled_times = $this->state
    ->get(static::SCHEDULE_STATE_KEY);
  return isset($scheduled_times[$scheduledTask
    ->id()]) ? $scheduled_times[$scheduledTask
    ->id()] : NULL;
}