StartCalendarInterval Question
StartCalendarInterval Question
- Subject: StartCalendarInterval Question
- From: Dave Swan <email@hidden>
- Date: Wed, 30 May 2007 13:15:02 -0700
I've begun playing with launchd to replace some cron jobs we've used
in the past. I ran into a problem with the StartCalendarInterval key
in the launchd plist file. I couldn't get my jobs to launch
automatically at the appointed time. I finally traced it down to the
Month key. If I put 5 (currently it is May) in the value, the job
does not get launched. If I put in 4, it does. Are months numbered
from 0-11 rather than 1-12 as they are in cron, or am I
misunderstanding something? A sample plist file is below.
Just a sample that does NOT launch unless the Month key is set to 4
(we are currently in May):
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.apple.safari</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/Safari.app/Contents/MacOS/Safari</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Minute</key>
<integer>57</integer>
<key>Hour</key>
<integer>11</integer>
<key>Day</key>
<integer>30</integer>
<key>Month</key>
<integer>5</integer>
</dict>
</dict>
</plist>
---------------------------------
Dave Swan
Allume/SmithMicro
email@hidden
530-347-3297
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden