define('BX_DATABASE_HOST', '%DB_HOST%'); ///< db host define('BX_DATABASE_SOCK', '%DB_SOCK%'); ///< db socket define('BX_DATABASE_PORT', '%DB_PORT%'); ///< db port define('BX_DATABASE_USER', '%DB_USER%'); ///< db user define('BX_DATABASE_PASS', '%DB_PASSWORD%'); ///< db password define('BX_DATABASE_NAME', '%DB_NAME%'); ///< db name define('BX_SYSTEM_FFMPEG', '%FFMPEG_PATH%'); ///< path to ffmpeg binary define('BX_DOL_SECRET', '%SECRET%'); ///< secret word define('BX_DB_FULL_VISUAL_PROCESSING', true); ///< upon db error - show error message define('BX_DB_FULL_DEBUG_MODE', false); ///< upon db error - show detailed report (turn off in production mode) define('BX_DB_DO_EMAIL_ERROR_REPORT', true); ///< upon db error - send email with detailed report error_reporting(E_ALL); mb_internal_encoding('UTF-8'); mb_regex_encoding('UTF-8'); date_default_timezone_set('UTC'); require_once 'params.inc.php'; bx_check_maintenance_mode(true); bx_check_minimal_requirements(true); bx_check_redirect_to_correct_hostname(true); bx_check_redirect_to_remove_install_folder(true);
if (!empty($aJob['service_call']) && BxDolService::isSerializedService($aJob['service_call'])) { BxDolService::callSerialized($aJob['service_call']); } } } bx_import('BxDolCronQuery'); $oDb = BxDolCronQuery::getInstance(); // run one time transient jobs $aJobsTransient = $oDb->getTransientJobs(); if (!empty($aJobsTransient)) { $oDb->deleteTransientJobs(); foreach ($aJobsTransient as $aRow) { runJob($aRow); } if (isset($aJobsTransient['sys_perform_upgrade'])) { exit; } } if (bx_check_maintenance_mode()) { // don't run regular cron jobs when site is in maintenance mode exit; } bx_import('BxDolLanguages'); // run regular cron jobs $aJobs = $oDb->getJobs(); $aDate = getdate(time()); foreach ($aJobs as $aRow) { if (checkCronJob($aRow['time'], $aDate)) { runJob($aRow); } }