Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
13 years, 8 months ago
I am going to schedule a job by using at command. Here I tried the following command:
$ at now + 1 minute
echo 'Test at command'
I saw the job is scheduled by using at -l. However, I saw no echo out.
I guess that I may need to add user to at.allow file. I cannot find at.allow in my Mac (Snow Leopard). Not sure what I need to do to test this at command?
25.3k 8 8 gold badges 66 66 silver badges 75 75 bronze badges
Sep 19, 2009 at 4:24
4,855 9 9 gold badges 32 32 silver badges 36 36 bronze badges
To enable the needed
atrun daemon, as
man atrun says, execute:
launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist
as root (e.g. via
sudo). Once you've done that,
/var/at/ will be the key directory (though the simplest way is to use
at as root -- e.g., once again, by
Sep 19, 2009 at 4:46
Alex Martelli Alex Martelli
1,466 13 13 silver badges 10 10 bronze badges
In Snow Leopard you need to:
/System/Library/LaunchDaemons/com.apple.atrun.plist, change the disabled child node from
Unload the current
sudo launchctl unload -F /System/Library/LaunchDaemons/com.apple.atrun.plist
Then load the edited version
sudo launchctl load -F /System/Library/LaunchDaemons/com.apple.atrun.plist
Test that it works with:
echo blah | at now+1
In case the echo fails for a different reason, you should be able to at least see the queue get cleared with:
1,195 9 9 silver badges 33 33 bronze badges
May 28, 2010 at 5:53
I tried this on OS X Lion and it seemed to work.
First enable the
launchctl load -w
Then add [your username] to
When executed you will receive output at
I find that queued items with
batch take a few minutes to get actually get executed.
May 24, 2012 at 17:42
151 1 1 silver badge 2 2 bronze badges
Others have replied about
at being disabled on Mac OS X, and I don't know about that, but there is another problem: Where do you expect your echo command to print its message? On other Unix systems that I have used it does not print in the same shell window where you gave the at command. Remember that when the at job is run, you might not even be logged in any more.
Try to write something to a file instead, and see if that file appears at the right time.
Sep 19, 2009 at 5:01
launchctl step wasn't enough for me;
Seamus's comment pointed me to a more recent answer.
The TL;DR is you also need to add
/usr/libexec/atrun at System Preferences > Security & Privacy > Full Disk Access.
Jul 30, 2020 at 20:26
Carl Walsh Carl Walsh
373 3 3 silver badges 16 16 bronze badges
My installation of OS X (10.4) says in
at, batch, atq, atrm are all disabled by default on Mac OS X.
Have you enabled
atrun according to the instructions there?
Sep 19, 2009 at 4:30
Greg Hewgill Greg Hewgill
5,489 2 2 gold badges 28 28 silver badges 30 30 bronze badges
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only