Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to Use "at" Command Line Utility?

I've been playing with the command line utility "at" for a couple of hours and I cannot get it to work. I've gone over the man page several times. I've tried various syntax. I've Googled and have not found any additional explanation.


I can get it to queu a job, but it never executes the job. The time for it to execute comes and goes while the job just stays in the queue.


Can anyone tell me how to get "at" working? What is the proper syntax? Can you give me an example I could test?


Thanks

MacBook Pro 15, Mac OS X (10.6.7)

Posted on Jun 25, 2011 2:44 PM

Reply
Question marked as Best reply

Posted on Jun 25, 2011 4:44 PM

Guessing... If you are attempting to invoke a script or executabled, is the script marked as executable?


chmod u+x script


Do you have an at.allow file around and (if you do), does it allow your user access?


Did you use launchd to load the atrun plist?

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist


Are you using a shell-level text editor and not (for instance) TextEdit or other GUI text editor?


There are examples of using the at command here and here.

4 replies
Question marked as Best reply

Jun 25, 2011 4:44 PM in response to Auctoris

Guessing... If you are attempting to invoke a script or executabled, is the script marked as executable?


chmod u+x script


Do you have an at.allow file around and (if you do), does it allow your user access?


Did you use launchd to load the atrun plist?

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist


Are you using a shell-level text editor and not (for instance) TextEdit or other GUI text editor?


There are examples of using the at command here and here.

Jun 25, 2011 4:55 PM in response to MrHoffman

Did you use launchd to load the atrun plist?

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist



That would be the problem. I had no idea there was another step involved in getting at to run. I just looked at the atrun man page and found that Apple has it disabled by default. Thank you Apple.


The atrun utility runs commands queued by at(1). It is invoked periodi-

cally by launchd(8) as specified in the com.apple.atrun.plist property

list. By default the property list contains the Disabled key set to

true, so atrun is never invoked.


Thanks for the reply and the help.

How to Use "at" Command Line Utility?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.