Cron Job in Mac OSX Version 10.5 +

| No Comments

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

About this Entry

This page contains a single entry by gauli002 published on April 17, 2011 11:53 AM.

Installing Islandora module was the previous entry in this blog.

Creating Drupal database for Islandora is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.