help with launchd / cron replacement - Moodle OSX install
I'm working with Moodle (moodle.org) and trying to load it on an OS X server with specs below:
Moodle 1.9.8+ (Build: 20100526)
Mac server OS X 10.5.8
Moodle requires a cron job to run every 5 minutes to update forums, send out emails, etc - basically proper functioning of the site. However, this version of OS X uses launchd rather than cron for cron jobs, and I can't get it working per Moodle's documentation. Here's the error I get in the system.log:
May 31 13:28:20 lcps_mac1 com.apple.launchd (moodle4mac.cron): posix_spawnp("curl -s http://lcps_mac1.lcps.k12.va.us/moodle/admin/cron.php", ...): No such file or directory
May 31 13:28:20 lcps_mac1 com.apple.launchd (moodle4mac.cron): Exited with exit code: 1
As you can see, I'm trying to use curl to open the cron.php page from our Moodle site, which will run the board updates, etc. Running it manually from the command line with curl works fine.
Here's my plist file:
lcps_mac1:LaunchDaemons admin$ cat /Library/LaunchDaemons/moodle4mac.cron.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<string>curl -s http://lcps_mac1.lcps.k12.va.us/moodle/admin/cron.php</string>
I've tried editing the file by hand as well as installing Lingon, to no avail. Here are the permissions on the plist file:
-rw-r--r-- 1 root wheel 481 May 31 13:27 moodle4mac.cron.plist
And finally, here's the Moodle info on doing this:
Cron - MoodleDocs
I'm stuck, but I feel it's something basic with launchd that I'm doing wrong. I've tried posting my issue on the Moodle boards, but haven't gotten any help. So I'm hoping my other tech friends can shed some light on the issue.
I've been given the suggestion to wipe the OS X box and load Ubuntu - if my boss would go for it I'd do it in a heartbeat ;) But to no avail...