Mac OS X 10.10.2: launchd StartCalendarInterval doesn't run jobs after waking from sleep.

Originator:craig.hockenberry
Number:rdar://19800541 Date Originated:11-Feb-2015 12:11 PM
Status:Open Resolved:
Product:OS X Product Version:Mac OS X 10.10.2 (14C109)
Classification:Serious Bug Reproducible:Always
 
Summary:

The StartCalendarInterval key in a launchd plist doesn’t run a job after waking from sleep. According to the documentation:

“If you schedule a launchd job by setting the StartCalendarInterval key and the computer is asleep when the job should have run, your job will run when the computer wakes up.”

Steps to Reproduce:

1) Create a job that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>org.furbo.dim</string>
    <key>ProgramArguments</key>
    <array>
        <string>/Users/craig/bin/dim</string>
    </array>
    <key>StartCalendarInterval</key>
    <dict>
        <key>Hour</key>
        <integer>17</integer>
        <key>Minute</key>
        <integer>00</integer>
    </dict>
</dict>
</plist>

2) Sleep the machine at 16:50.

3) Wake the machine at 17:10.

Expected Results:

The /Users/craig/bin/dim script should run at 17:10 or thereabouts.

Actual Results:

The /Users/craig/bin/dim script never runs.

Notes:

If the machine is awake at 17:00, the script runs fine.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!