Dear Apple: Fix launchd, document please?

Mar 06, 2009 10:57

Apparently, cron is deprecated in OSX 10.5.

K, fine. But its replacement, launchd, is a crappy replacement. It has no concept of time ranges (Or does it? Any mac folks with insight to share here?)

I want to replicate this crontab:

0,20,40 8-17 * * * /users/drallen/bin/thing.sh

So, run every 20 minutes between 8am and 5pm 5:40pm ( Read more... )

mac, sucks

Leave a comment

Comments 9

sachmet March 6 2009, 16:44:06 UTC
Apple's doc on launchd.plist suggests StartCalendarInterval can be configured to take an array of hour/minute pairs, which while tedious to create, would give you back the 8-5 flexibility.

Alternately, you could create a shell wrapper that says "Is it between 8 and 5? No? Quit!" but that seems ridiculous to have to do.

(P.S. Isn't StartInterval of 300... 5 minutes, not 20? Wouldn't you want 1200 instead? Also, I think your cron runs every 20 minutes from 8:00 - 5:40 PM.)

Reply

da_lj March 6 2009, 16:46:32 UTC
..ya, I copied someone else's example for the post, didn't change the 300. :)

Reply


ckd March 6 2009, 16:48:03 UTC
I don't think cron is so deprecated as to be in danger of removal, because it's part of IEEE Std 1003.1.

I can't help with the "why's cron broken" problem, alas.

Reply

da_lj March 6 2009, 17:58:58 UTC
I don't know squat from IEEE standards fights.. context?

Reply

ckd March 7 2009, 20:56:52 UTC
IEEE 1003 is POSIX, which is incorporated into Single UNIX Specification 3 and the "UNIX 03" specification. Since Apple is trumpeting their conformance with these specs, crontab is safe.

Reply


ng_nighthawk March 6 2009, 17:23:00 UTC
Depricate cron?

I was also thinking that ls, rm, and ln are really kinda old concepts and should be replaced.

Oooh, and while we're at it, let's revamp grep to take completely new and different parameters.

This will help with usability, where usability is equivalent to proprietary offshoots of commonly used functionality to make Mac users more separate from other communities.

Grumbly, grumbly.

Reply

da_lj March 6 2009, 17:56:57 UTC
Yeah. That.

As for different grep parameters, at least we're sort of used to that with Solaris/GNU/whatever differences.

Cute userpic. :)

Reply


insaint March 6 2009, 17:25:15 UTC
XML is the answer to all life's problems and a few of life's solutions.

Reply


merle_ March 7 2009, 16:35:03 UTC
Deprecate cron? I'm trying to think of another *nix-based system without cron and failing. Next thing you know they'll deprecate sed and grep. "But you can do the same things in perl, why do you need those old tools?"

XML never seemed like a good idea to me. Human readable is one thing, the ability to have a generic syntax validator is cool, but it adds so much junk. One of my jobs at work is a process that takes a large database extract and rewrites about a fifth of it into XML.. creating a 5G file, which then gets compressed and sent via FTP over an already burdened connection. Daily.

The stuff you can do with XSLT is completely awesome, don't get me wrong. But I can do a heck of a lot with cut/sed/grep/perl on tab-delimited files.

Reply


Leave a comment

Up