1 Reply Latest reply: Aug 5, 2010 9:28 AM by Camelot
Todd Heberlein1 Level 1 Level 1
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
  • Camelot Level 8 Level 8
    Mac OS X
    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.