Why are my at jobs running immediately on OS X?

Posted by Gabe on Super User See other posts from Super User or by Gabe
Published on 2010-05-15T17:02:41Z Indexed on 2010/05/15 17:06 UTC
Read the original article Hit count: 372

Filed under:
|

I want to schedule events for exact times in Mac OS X. It seems like the 'at' command is the simplest way to do this.

I have enabled atrun using the command: launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist

To test at, I'm using the following one-line BASH script: echo 'foo' >> path/to/log.txt | at now + 2 minutes

When I run the script, I get output like: job 17 at Sat May 15 12:57:00 2010 where '12:57:00' is indeed 2 minutes in the future. But the echo command executes immediately: the line 'foo' is added to log.txt right away.

How can I make at work for me?

© Super User or respective owner

Related posts about osx

Related posts about unix