Forums | Mahara Community

Support /
Very slow cron job

anonymous profile picture
Account deleted
Posts: 6

02 November 2011, 18:31

Hi there,

I'm currently experiencing an issue that the cron job runs for hours which slows down the entire server. Mahara 1.4 is running and the cron job is set like:

0 * * * * php /home/www/domains/site_name/public_html/htdocs/lib/cron.php > /dev/null 2>&1

Is there anything wrong with the setting? Thanks in advance for any input.

Edits to this post:

François Marier's profile picture
Posts: 411

08 November 2011, 17:44

Hi Aaron,

Ideally the Mahara cron should be set to run more often than once per hour. Most of the time, it will not do anything and return immediately (or very quickly), so we recommend running it every minute with something like:

* * * * *   www-data     if [ -r /usr/share/mahara/lib/cron.php ] ; then /usr/bin/php5 /usr/share/mahara/lib/cron.php >>/var/log/mahara/cron.log 2>&1 ; fi

Note that the above also logs the cron messages to a file which might help you figure out which function is taking a really long time.



A post by Account deleted was deleted

3 results