↓ Go Home

bryanculver.com

November 24, 2008 @ 19:01

Run an Application at Daily, Weekly or Monthly Intervals on a Mac

Someone has a better tutorial up at: http://madebyalex.org/2006/09/11/launchd-as-cron/. He has made it so that it will start upon startup of the scheduled time is missed because the computer is off.

Have you ever wanted an application to run at a certain interval, but don’t want to create thousands of iCal events or even worry about leaving iCal open? Well, this tutorial is for you! (Was that kinda cheesy?) I am not much of a programmer or software guru but this tutorial came out of the need of a friend to run the Camino Nightly downloader every night. We scanned the net for about a half hour before we compiled three tutorials to get what he needed. So you people don’t have to do a makeshift search job as we did, here is a compiled tutorial. NOTE: All quotes are present to keep path and commands separate from the sentence. Please ignore them when copy and pasting.
Step 1
Place the application you want to have scheduled to run in your “/Applications” folder.
Step 2
Open your Terminal, “/Applications/Utilities/Terminal.app”
Step 3
Type crontab -e, this will bring up the Editor.
Step 4
Figure out when you want this task to run.

Key

Each day of the week corresponds to a number; Sunday = 0, Monday = 1, etc. You can replace the Hour, Date, Month and Day of Week numbers with a “*” to run every Hour, Day, etc. To have the application run every minute, you must replace the minute number with a “+1″. There are other configurations such as,

Run every set of hours 0 +6 * * * will have the application run ever 6 hours.

Run at noon every weekday 0 12 * * 1-5

Step 5

Enter the path of your application with the “.app” included

Step 6

Press Escape (on your keyboard)

Step 7

Enter : then wq then press Enter

Congratulations! You have successfully created a cron job to start your application automatically!


Digg this
Wordpress v2.7 | This has been a 5MinuteDesign | XHTML | CSS | RSS2 | 0.058