Forums | Mahara Community

Support /
cronjob again


Aaron Wells's profile picture
Posts: 896

13 November 2013, 12:01

Hi Conrad,

The date that cron_site_data_daily() inserts into the "site_data" table, will be the date that the task itself actually runs on. The task is scheduled to run at 11:51pm each day, but if your cron is having delays then it's possible it may not run until after midnight, causing it to label the data with today's date instead of yesterday's date.

Perhaps that's what you're seeing?

Cheers,

Aaron

Conrad Lienhardt's profile picture
Posts: 127

16 November 2013, 10:20

Hi Aaron,

thant you! I set the scheduled task to run at 11pm to avoid what you described. And that runs. I don't know what causes the delay of the cron. As mentioned: only 50 Students are working with the system, not more than 24 daily.

Another notice: When I am calling "Adminstrator" in the Navigation, sometimes it lasts 20, 30 seconds until it opens. Compared to the demo on mahara.org it seems endless.

 

An error message may also give a hiint that perhaps the MySQL database (innoDB) has ressource problems:
Here the error message, mahara generated when calling a page

Failed to get a recordset: mysql error: [2006: MySQL server has gone away] in EXECUTE("         SELECT u.institution,IF(ctime >= '1970-01-01', UNIX_TIMESTAMP(ctime), TIMESTAMPDIFF(SECOND, '1970-01-01', ctime)) AS ctime,IF(u.expiry >= '1970-01-01', UNIX_TIMESTAMP(u.expiry), TIMESTAMPDIFF(SECOND, '1970-01-01', u.expiry)) AS membership_expiry,u.studentid,u.staff,u.admin,i.displayname,i.theme,i.registerallowed, i.showonlineusers,i.allowinstitutionpublicviews, i.logo, i.style, i.licensemandatory, i.licensedefault         FROM "ep_usr_institution" u INNER JOIN "ep_institution" i ON u.institution = i.name         WHERE u.usr = '2' ORDER BY i.priority DESC") Command was:         SELECT u.institution,IF(ctime >= '1970-01-01', UNIX_TIMESTAMP(ctime), TIMESTAMPDIFF(SECOND, '1970-01-01', ctime)) AS ctime,IF(u.expiry >= '1970-01-01', UNIX_TIMESTAMP(u.expiry), TIMESTAMPDIFF(SECOND, '1970-01-01', u.expiry)) AS membership_expiry,u.studentid,u.staff,u.admin,i.displayname,i.theme,i.registerallowed, i.showonlineusers,i.allowinstitutionpublicviews, i.logo, i.style, i.licensemandatory, i.licensedefault         FROM "ep_usr_institution" u INNER JOIN "ep_institution" i ON u.institution = i.name         WHERE u.usr = ? ORDER BY i.priority DESC and values was (2)

Thanks and Regards
Conrad

Conrad Lienhardt's profile picture
Posts: 127

20 November 2013, 1:33

Hi,

my provider and hoster of mahara tried to run the cronjob by command line and gets the following message

<b>Warning</b>:  error_log() [<a href='function.error-log'>function.error-log</a>]: 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, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1,0/no DST' instead in <b>/home/.sites/383/site150/web/eportfolio/lib/errors.php</b> on line <b>243</b><br />

Perhaps this has something to do with the previous post.

Who can give me some help?

Thanks and Regards
Conrad

Aaron Wells's profile picture
Posts: 896

20 November 2013, 11:56

Hi Conrad,

Here's a forum thread about that warning message and how to resolve it: https://mahara.org/interaction/forum/topic.php?id=4195

I think it's unlikely that this warning message is causing problems for you (although it's possible it may cause timing issues). But it is usually good to fix warning messages, at least so that they don't clutter up your logs.

Cheers,

Aaron

Conrad Lienhardt's profile picture
Posts: 127

22 November 2013, 21:21

Hi Aaron,

thanks for the fix towards timing issues.

Nevertheless - and despite my hoster is running the cronjob in command line (see my last message) - the crons suck.

_cron_lock_core_cron_site_data_daily

_cron_lock_core_file_cleanup_old_cached_files

So; what might be the cause for that bugs, if not caused by cronjobs (not even running in command line)?

Who has a clue.

Btw. Where in the database are the old cached files located, so I can clean them manually?

Greetings,
Conrad

15 results