setCronLastTime example

// 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;
    }

    // Restore the user.     $this->accountSwitcher->switchBack();

    
Home | Imprint | This part of the site doesn't use cookies.