Source Drupal
MacOS X after 10.5 no longer seems to use cron and has replaced it by launchd. This uses plist files to register jobs to run. To access cron.php using launchd place the following file in /Users/your_account/Library/LaunchAgents/com.your_site.drupal_cron (create the directory if necessary):
com.x-128-101-146-59.drupal_cron.plist
This will then get loaded when you login and will visit the cron.php page every 300 seconds (5 minutes). To make it take affect you need to logout/login or use the terminal to run launchctl to load it immediately:
launchctl load /Users/your_account/Library/LaunchAgents/com.your_site.drupal_cron
If you need to change the plist file you can unload and reload it again with:
launchctl unload /Users/your_account/Library/LaunchAgents/com.your_site.drupal_cron
launchctl load /Users/your_account/Library/LaunchAgents/com.your_site.drupal_cron
(If you have XTools installed you can use /Developer/Applications/Utilities/Property List Editor to create plist files.)

Leave a comment