You can run a cronjob using crontab.
So basically, to run a cronjob, you will need to type
nano ~/crontab in Terminal. This will create a new file called "crontab" in your home folder, and open up a simple text editor in Terminal. Type:
* * * * * osascript ~/Desktop/theScriptToBeExecuted.applescript
This will run an AppleScript named "theScriptToBeExecuted.applescript" located on your desktop, every minute. The five "*" before the
osascript command specify the time. Here's a table to show you what each field stands for:
* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)
So to run the same command at one minute past midnight (00:01) of every day of the month, of every day of the week, type this in the file:
1 0 * * * osascript ~/Desktop/theScriptToBeExecuted.applescript
If you need more info, check out this article on cron.
To save the file that you're working on, type Control+X (exits), then Y (tells Terminal that you do want to save the file), then Enter Now type at the prompt
cron ~/crontab This tells cron that it should be looking at the crontab file, if your file is named "crontab" in your home folder.
Another alternative is Cronnix It's a GUI for crontab.
Script Timer is similar, but it runs specified AppleScripts at specified times. It's a little easier to use, but it costs $12. I would recommend just going with Cronnix (free) or crontab (also free!)