Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

StartCalendarInterval Question



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.