public function Schedule::getNextRun in Backup and Migrate 5.0.x
Same name and namespace in other branches
- 8.4 src/Entity/Schedule.php \Drupal\backup_migrate\Entity\Schedule::getNextRun()
Get the next time this schedule should run.
Return value
int The timestamp for the next run.
1 call to Schedule::getNextRun()
- Schedule::run in src/
Entity/ Schedule.php - Run the schedule.
File
- src/
Entity/ Schedule.php, line 212
Class
- Schedule
- Defines the Schedule entity.
Namespace
Drupal\backup_migrate\EntityCode
public function getNextRun() {
$last_run_at = $this
->getLastRun();
if ($last_run_at) {
return $last_run_at + $this
->get('period');
}
return \Drupal::time()
->getRequestTime() - 1;
}