Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If a launchd job has a StartInterval of 600 and it's been "some time" since the plist was loaded.

How can one determine how much time remains until the next scheduled run?

share|improve this question

It really depends on why you care (inherently, you shouldn't, or more likely, there's some better way to do it). It all comes down to your script being smarter. Drop a turd file or use the script to either defer until next run, or go into a holding pattern.

share|improve this answer
Agreed, in the running of our script, we dont' care. – Allen Hancock Jan 9 '12 at 23:43

You can't. Indeed launchd doesn't even guarantee to an interval of exactly 600 seconds, just close.

The best way to do something similar is to get your launchd task to touch a file, preferably in /var/tmp

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.