Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

launchd doesn't launch script on time

I have a launchd configuration file that uses StartCalendarInterval to start an script at a given time (1 minute after midnight). Everything seems to work on my Mac Pro workstation, but on a Mac Mini web server (no keyboard, mouse, or monitor; firewall turned on; very quiet test network) launchd doesn't get around to running the program until very late -- today it was 5 hours late!

Does anyone know why launchd would be so late at running a program? Is this a known possibility?

Mac Mini 2.4 GHz Intel Core 2 Duo, Mac OS X (10.6.4), Headless

Posted on Aug 3, 2010 10:29 AM

Reply
1 reply

Aug 5, 2010 9:28 AM in response to Todd Heberlein1

The most obvious question is whether the clock on the system is correct or not? 🙂

Second to that, what do the logs say? Did it try to launch at the correct time but some other factor stalled it for 5 hours? Or did it not launch at all?

Third, what does the script do and how are you determining that it's running 5 hours late? In other words, if you're basing your 'late' statement on some action the script takes (e.g. emailing results, writing a file, etc.) then have you checked that there's not some earlier process that's taking 5 hours to execute and that's the cause of the delay, rather than launchd not executing the script on schedule?

The logs, especially /var/log/system.log, should help determine these answers.

launchd doesn't launch script on time

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.