OS X Unix: Lesson of the Day

by Erica Sadun

Today I learned (the hard way, is there any other way?) that by default OS X disables atrun, making calls to "at" and "batch" into pointless exercises of futility. The man page notes how to re-enable atrun, but warns against it because of power management concerns.

I'm not a big crontab fan for one-time jobs and I don't really like using iCal to schedule Unix commands. So I ended up using sleep.

Good move? Bad move? Advise me, people.


2006-04-12 10:10:48
I know you mentioned it was a one-time job, but If you are using 10.4, use launchd directly instead. Look for a program called "Lingon" is you want a GUI way of setting it up.

Also, what kind of Mac are you running? I believe atrun has its issues with Macs going to sleep and not letting the processor go into a low power mode (I could be wrong about that last point). If your mac isn't a laptop, that might not be an issue for you.

Also, using sleep from the command line causes power management problems, too. So, if you use a lot of one-time jobs, you might as well re-enable atrun.


2006-04-12 10:14:04
Weren't cron and atrun subsumed into launchd under Tiger? Not that I have had to use launchd yet, mind you, but I recall pre-release buzz to that effect.
2006-04-12 11:07:36
/Applications/Automator ???
Drew McCormack
2006-04-12 11:59:31
Indeed, use launchd.

For a quick example of using launchd to clean your desktop, see my latest blog post.

2006-04-12 12:32:09
Holy $#!+! All this time I thought at just didn't work, and it's just a matter of enabling it? Jeeeeeeeeeeez.

Hm... power management concerns... does that mean the computer wakes up every 10 minutes? On my desktop at work, which I don' t ever let sleep, that's not a problem. My iBook, though, yeah problem. The battery is fast on its way to the junk heap as it is.

2006-04-12 17:04:33
Flip, Automator only makes scripts and doesn't schedule event run times. The easiest way to schedule automator scripts is by using iCal events. But the author doesn't want to use iCal.
2006-04-12 23:05:08
Check out Proxi from Griffin Technologies !

It's so powerfull.