1

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?

1

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.

  • Agreed, in the running of our script, we dont' care. – Allen Hancock Jan 9 '12 at 23:43
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .