You are here

function _notify_cron_next in Notify 2.0.x

Same name and namespace in other branches
  1. 8 notify.module \_notify_cron_next()
  2. 7 notify.module \_notify_cron_next()
  3. 1.0.x notify.module \_notify_cron_next()

Function to send next cron.

2 calls to _notify_cron_next()
QueueForm::buildForm in src/Form/QueueForm.php
Form constructor.
_notify_next_notificaton in ./notify.module
Compute the next time a notification should be sent.

File

./notify.module, line 469
Hooks for Notify module.

Code

function _notify_cron_next($next_time_to_send) {
  $config = \Drupal::config('notify.settings');
  $send_hour = $config
    ->get('notify_send_hour');

  // Compute the next as the sending hour today.
  $cron_next = strtotime(date('Y-m-d ', $next_time_to_send) . $send_hour . ':00:00');
  return $cron_next;
}