invokeCronHandlers example

// Try to allocate enough time to run all the hook_cron implementations.     Environment::setTimeLimit(240);

    $return = FALSE;

    // Try to acquire cron lock.     if (!$this->lock->acquire('cron', 900.0)) {
      // Cron is still running normally.       $this->logger->warning('Attempting to re-run cron while it is already running.');
    }
    else {
      $this->invokeCronHandlers();

      // Process cron queues.       $this->processQueues();

      $this->setCronLastTime();

      // Release cron lock.       $this->lock->release('cron');

      // Return TRUE so other functions can check if it did run successfully       $return = TRUE;
    }
Home | Imprint | This part of the site doesn't use cookies.