function cron_image_url_handler(&$sm, $url_array) { header("Content-Type: image/gif"); echo base64_decode("R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="); flush(); $cron_flag = VIVVO_FS_ROOT . 'cache/.cron.lock'; // call cron only if it's been at least a minute since the last if (file_exists($cron_flag) and filemtime($cron_flag) > VIVVO_START_TIME - 60) { exit; } // reset flag @unlink($cron_flag); touch($cron_flag); require_once VIVVO_FS_INSTALL_ROOT . 'lib/vivvo/framework/vivvo_cron.php'; ignore_user_abort(true); $cm = new vivvo_cron_manager($sm); $cm->execute(); exit; }
/** * Handles cronjob.php --touch */ function action_touch($options) { defined('VIVVO_START_TIME') or define('VIVVO_START_TIME', time()); $cron_flag = VIVVO_FS_ROOT . 'cache/.cron.lock'; // call cron only if it's been at least a minute since the last if (file_exists($cron_flag) and VIVVO_START_TIME - filemtime($cron_flag) < 60) { cronjob_error('Cron manager has already been called less than a minute ago.'); } // reset flag @unlink($cron_flag); touch($cron_flag); require_once VIVVO_FS_INSTALL_ROOT . 'lib/vivvo/vivvo_lite_site.php'; require_once VIVVO_FS_INSTALL_ROOT . 'lib/vivvo/framework/vivvo_cron.php'; error_reporting(E_ERROR); define('VIVVO_SKIP_URL_PARSING', true); $sm = vivvo_lite_site::get_instance(); $cm = new vivvo_cron_manager($sm); $cm->execute(); echo 'Cron manager executed successfully.' . PHP_EOL; }