function cronNotRunAlert() { if (manageEasyCron::isActive()) { return; //if easyCron is active no need of following check and alert } //cron job should run every 20 mins $cronLastRun = getOption('cronLastRun'); if ($cronLastRun > time() - 40 * 60) { //checking for 40 mins instead of 20 mins here return; } $requiredFor = array(); $settings = panelRequestManager::getSettings(); $updatesNotificationMail = $settings['notifications']['updatesNotificationMail']; //check setting if (!($updatesNotificationMail['frequency'] == 'never' || empty($updatesNotificationMail['coreUpdates']) && empty($updatesNotificationMail['pluginUpdates']) && empty($updatesNotificationMail['themeUpdates']))) { $requiredFor[] = 'Email Update Notification'; } setHook('cronRequiredAlert', $requiredFor); if (!empty($requiredFor)) { addNotification($type = 'E', $title = 'CRON JOB IS NOT RUNNING', $message = 'Please set the cron job to run every 20 minutes.<div class="droid700" style="white-space: pre; word-wrap: break-word;">' . APP_PHP_CRON_CMD . APP_ROOT . '/cron.php >/dev/null 2>&1</div><br>It is required for the following -<br>' . @implode('<br>', $requiredFor), $state = 'U', $callbackOnClose = '', $callbackReference = ''); } }