Mac task scheduling FAQ: Is there a simple way to schedule a task/job on a Mac OS X system to run on a certain date and time? (For Linux/Unix users: Like running a Unix job with the crontab facility, but in a GUI?)
In an earlier article I detailed how to run Unix jobs on a Mac system in this Mac OS X crontab (launchd) tutorial. But today I was looking for an easier way to run Mac programs at certain times, or to schedule email reminders to be sent to myself, preferably using a Mac GUI client.Back to top
1) Simple Mac job scheduling with iCal
After doing some research, it looks like the best way to easily schedule tasks on Mac OS X systems is with iCal. The process of iCal task scheduling isn't really obvious, so I'll walk you through the steps.
One requirement before we begin: If you want to send an email alert to yourself using a Mac scheduled task, you'll want to have Mac Mail already configured to work with your internet service provider at home or the organization where you work (wherever your mail server is). If you want to send emails you'll need to have that set up, but if you just want simple on-screen reminders, you can safely continue reading this article.Back to top
2) Scheduling a recurring Mac task with iCal
For this example I'll use a common need: I'd like have an email reminder be sent to me every month, reminding me to pay my rent.
To do this, open iCal on your Mac, and go to the day in the current month when you'd like to have the email reminder sent to you. For me, this is the 25th of every month, so I navigate to March 25th.
Next, switch to the Day view, then double-click any time in the day view to create your iCal event. You can adjust this time later, or, if you know you want the email sent at 8am, go ahead and double-click on the 8am slot.
When you create this event, give it a name like "Pay Rent". This name will show up in the email that is sent later, so make it meaningful.
Edit the event details
Once this basic event has been created, you edit the event details to tell iCal to send you an email. To do this, either a) double-click the event, or b) right-click the event, select Get Info from the popup menu, and then click Edit on the next menu.
When you do this a dialog is shown that extends from the event. You use this dialog to tell iCal what to do when this date and time occurs.
For my simple example I want an email sent out every month on the 25th, so I edit the fields like this:
location I leave this field alone.
all day I don't check this box, this is not an "all day" event.
from If you want to adjust the starting time, edit this field. This field relates to the 'alarm' field below, as you'll see shortly.
to This field doesn't matter for this type of event, so leave it alone.
calendar This field doesn't matter to me, but you can choose the option of "Home" if you prefer.
alarm This is where the fun begins. In my case I want to send an email, so I choose the Email option from the menu. Depending on which version of Mac OS X you're using, things will vary here a little bit, but in general you need to tell the system where to send the email alert message to. I select my personal email account, and then continue. (On Mac OS X 10.5, this seems to open the Address Book application. On Mac OS X 10.6 it seems to open the Mac Mail application.)
After specifying who you want the email to be sent to, you specify when you want the email reminder message to be sent. You'll see that you can choose options like:
- Minutes before
- Hours before
- Days before
- Minutes after
- Hours after
- Days after
- On date
To have your reminder message mailed to you at the time of your event choose the "On Date" option, otherwise choose one of the other options (and also adjust your event time as desired).
When you do this you'll see that iCal will let you create another alarm/reminder for this event. This is useful if you want to send reminder emails to different email addresses, or set up the other event/task reminders that iCal lets you set up.
For the purposes of this Mac scheduled task example, we'll just use one alarm, and move on.
attendees This field doesn't matter for this example.
attachments This field doesn't matter for this example.
url This field doesn't matter for this example.
notes This field doesn't matter for this example.
At this point you're editing iCal event will look like this:
When you're finished editing all these fields, click the Done button to save your new iCal event.
3) Testing a schedule Mac task/job
As you can see by looking at this "Edit Event" window, you can test this Mac job scheduling technique by setting an event time just a few minutes from now. For instance, it's 6:02pm as I type this, so I can schedule a Mac task for 6:05pm as a test just by editing the 'from' and 'alarm' fields.Back to top
4) Other iCal Mac job scheduling options
As you can also see by looking at this iCal Edit Event window -- in particular the Alarm field -- you can do other things with Mac scheduled events, including:
- Displaying a message
- Displaying a message with a sound
- Send an email
- Open a file
- Run a script
The one thing I would like to do here that I haven't seen is that I'd like to be able to run a Mac application at particular dates and times, but the "Run a script" option doesn't let me select a Mac application, so I don't know how to do this yet.Back to top
5) Related Mac task scheduling tutorials and examples
If this iCal Mac task scheduling capability doesn't offer enough power for you, and if you're not afraid of the Mac command line (the Terminal application and Unix command line), you can schedule tasks to run through the Mac launchd facility. Here are links to other Mac crontab and Mac launchd tutorials I've written:
Again, those are all intended for Unix users willing to work at the Unix command prompt.Back to top
6) Other Mac job/task scheduling options
I hope this Mac task scheduling example helps you run Mac tasks on a recurring schedule, and also helps you run one time only Mac scheduled tasks. As you can see, this approach can be helpful for a variety of tasks and reminders, including paying rent, paying bills, birthday reminders, and much more.Back to top
I am newbie to Mac Mini. Can you explore the steps to schedule a task & how to run it. I am trying to schedule a software i.e. BucketCommander.jar, its a command line version of Bucket Explorer.
I tried iCal to scheduled, but it takes parameters to run.
Normally to run on command prompt, the require following parameters-
java -jar BucketCommander.jar -action:upload -authenticate:my_profile_name -emailprofile:email_profile
If I schedule through iCal then how to pass those parameters. Please explain complete process of scheduled task.
Can ical schedule an event when the workstation is asleep? Currently running Snow Leopard 10.6.5.
or is there anything that will generate an event (running audit scripts) when the computer is asleep?