Posts made by Martin Dougiamas

Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
In case you're interested, we have an official Moodle development calendar where we (Moodle HQ) are keeping all our development meetings.

You can subscribe to it here:

http://www.google.com/calendar/ical/moodle.development%40gmail.com/public/basic.ics

Or browse it here:

http://www.google.com/calendar/embed?src=moodle.development%40gmail.com
Average of ratings: -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
This is what I use on moodle.org:

crontab:
---------
 
*/30 * * * * /opt/bin/moodlecron


/opt/bin/moodlecron
-------------------

#!/bin/bash

# Create a new lock (and exit this script if one already exists)
# -p = include PID ... and if a lock exists but the process doesn't then consider it stale

if (dotlockfile -p -r 0 /var/tmp/moodlecron.lock) then

# Perform the actual cron work

nice /opt/bin/php /var/www/html/moodle/admin/cron.php >> /logs/moodle_cron.txt 2>&1
nice /opt/bin/cleanupsessions

# Release the lock, allowing this script to be run next time

dotlockfile -u /var/tmp/moodlecron.lock

fi


And of course I installed dotlockfile