Forums | Mahara Community

Support /
Other Cron issues following skip poblem


zz s's profile picture
Posts: 9

03 March 2016, 21:38

Hi 

we have resolve the problem of cron skip  running, which is that config table has several values, in the "config“ need to be modified tocurrent day, for example

daily site = 1 3 2016 xxxx

it shoud be changed to "3 4 206 xxxx"

later, for each running cron script, it will generate error message like this.

However ,once the problem disappear 

[WAR] f9 (lib/adodb/adodb-time.inc.php:1073) mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still get$ Call stack (most recent first): * log_message("mktime(): It is not safe to rely on the system's t...", 8, true, true, "/var/www/html/mahara/lib/adodb/adodb-time.inc.php", 1073) at /var/www/html/mahara/lib/errors.php:441 * error(2, "mktime(): It is not safe to rely on the system's t...", "/var/www/html/mahara/lib/adodb/adodb-time.inc.php", 1073, array(size 6)) at Unknown:0 * mktime(00, 0, 1, 1, 1971) at /var/www/html/mahara/lib/adodb/adodb-time.inc.php:1073 * adodb_date("'Y-m-d H:i:s'", 1456990862) at /var/www/html/mahara/lib/adodb/adodb.inc.php:2546 * ADOConnection->DBTimeStamp(1456990862) at /var/www/html/mahara/lib/adodb/adodb.inc.php:2524 * ADOConnection->BindTimeStamp(1456990862) at /var/www/html/mahara/lib/dml.php:1460 * db_format_timestamp(1456990862) at /var/www/html/mahara/lib/cron.php:47 [WAR] f9 (lib/cron.php:491) date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, $ Call stack (most recent first): * log_message("date(): It is not safe to rely on the system's tim...", 8, true, true, "/var/www/html/mahara/lib/cron.php", 491) at /var/www/html/mahara/lib/errors.php:441 * error(2, "date(): It is not safe to rely on the system's tim...", "/var/www/html/mahara/lib/cron.php", 491, array(size 7)) at Unknown:0 * date("r", "1456988701") at /var/www/html/mahara/lib/cron.php:491 * cron_lock(object(stdClass), 1456990862) at /var/www/html/mahara/lib/cron.php:119 [INF] f9 (lib/cron.php:501) Skipping long-running cron job core_cron_site_data_daily (Thu, 03 Mar 2016 15:05:01 +0800). [WAR] f9 (lib/cron.php:491) date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, $ Call stack (most recent first): * log_message("date(): It is not safe to rely on the system's tim...", 8, true, true, "/var/www/html/mahara/lib/cron.php", 491) at /var/www/html/mahara/lib/errors.php:441 * error(2, "date(): It is not safe to rely on the system's tim...", "/var/www/html/mahara/lib/cron.php", 491, array(size 7)) at Unknown:0 * date("r", "1456988761") at /var/www/html/mahara/lib/cron.php:491 * cron_lock(object(stdClass), 1456990862) at /var/www/html/mahara/lib/cron.php:119 [INF] f9 (lib/cron.php:501) Skipping long-running cron job core_cron_institution_data_daily (Thu, 03 Mar 2016 15:06:01 +0800). [INF] f9 (lib/cron.php:137) Running core cron check_imap_for_bounces [WAR] f9 (lib/cron.php:171) getdate(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warnin$ Call stack (most recent first): * log_message("getdate(): It is not safe to rely on the system's ...", 8, true, true, "/var/www/html/mahara/lib/cron.php", 171) at /var/www/html/mahara/lib/errors.php:441 * error(2, "getdate(): It is not safe to rely on the system's ...", "/var/www/html/mahara/lib/cron.php", 171, array(size 2)) at Unknown:0 * getdate(1456990862) at /var/www/html/mahara/lib/cron.php:171 * cron_next_run_time(1456990862, array(size 8)) at /var/www/html/mahara/lib/cron.php:151 [WAR] f9 (lib/cron.php:310) mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning$ Call stack (most recent first): * log_message("mktime(): It is not safe to rely on the system's t...", 8, true, true, "/var/www/html/mahara/lib/cron.php", 310) at /var/www/html/mahara/lib/errors.php:441 * error(2, "mktime(): It is not safe to rely on the system's t...", "/var/www/html/mahara/lib/cron.php", 310, array(size 1)) at Unknown:0 * mktime(00, 0, 3, 3, 2016) at /var/www/html/mahara/lib/cron.php:310 * cron_day_of_week(array(size 11)) at /var/www/html/mahara/lib/cron.php:332 * cron_valid_day(array(size 8), array(size 11)) at /var/www/html/mahara/lib/cron.php:188 * cron_next_run_time(1456990862, array(size 8)) at /var/www/html/mahara/lib/cron.php:151 [WAR] f9 (lib/cron.php:310) date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, $ Call stack (most recent first): * log_message("date(): It is not safe to rely on the system's tim...", 8, true, true, "/var/www/html/mahara/lib/cron.php", 310) at /var/www/html/mahara/lib/errors.php:441 * error(2, "date(): It is not safe to rely on the system's tim...", "/var/www/html/mahara/lib/cron.php", 310, array(size 1)) at Unknown:0 * date("w", 1456934400) at /var/www/html/mahara/lib/cron.php:310

 

zz s's profile picture
Posts: 9

04 March 2016, 18:57

I think that i have identified the problem, however ,there is no way for me to resolve it.

we did find two tables after the " SELECT * FROM config WHERE field LIKE '\_%';" and delete it using the sql command you recommended.
here is what we found:
"_cron_lock_core_cron_institution_data_daily 1456988761
_cron_lock_core_cron_site_data_daily 1456988701
"

also, we need to modified config table ,especially for the value in the table of "cron(following the config table)";

we resolve the problem temporarily by setting the value ahead of the current time, it works before next running time in
""23 cron_institution_data_daily 2016-03-03 15:05:00 51 23 * * *""

after that time, it stopped running cron again.

 

I suspect that  it requires code level modification resolve it.

Ghada El-Zoghbi's profile picture
Posts: 122

01 April 2016, 16:46

Hi,

Form the error message you are getting:

mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function.

 

it probably means that you need to set your default timezone in php.ini.

If you don't have access to your php.ini file, you can set it for Mahara in the config.php file:

$cfg->dbtimezone = 'xxx';  <- enter your time zone here...

Please let me know if this helps.

Cheers,

Ghada

3 results