Issue
I am trying to make the at
bash command to run, but it is not working for me. I can add a job to the queue, but it is not run when the time is up. What am I doing wrong?
hpek@melda:~$ cat /usr/lib/cron/at.deny
hpek@melda:~$ atq
hpek@melda:~$ at now +2 minutes
echo TTTEEEST
job 12 at Sun May 6 02:09:00 2012
hpek@melda:~$ date
Sun May 6 02:10:24 CEST 2012
hpek@melda:~$ atq
12 Sun May 6 02:09:00 2012
hpek@melda:~$
UPD2021.08.06 atd was removed in MacOS 11.5.2 (or earlier)
$ sudo find / -name atd -print 2>/dev/null
$
Solution
Take a look at /var/at/jobs
and see if your at jobs are listed there. (It may be a different directory based upon OS).
By default, at
isn't enabled on most systems. In order for at
jobs to actually get executed, the atrun command must execute.
This command is executed either through launchd or through the cron depending upon the system.
The exact mechanisms are different from system to system, so you'll have to read all the various manpages on at
, atrun
, etc. to verify if at
is really enabled on your system, and whether you have permissions to run at jobs. There's normally both an ant allow and an ant deny file on your system, so you need to check both. You must be both in the allowed file, and also not in the deny file.
On top of that, you have to make sure that at
is even enabled on your system (due to security concerns, it is usually disabled).
Answered By - David W. Answer Checked By - Mary Flores (WPSolving Volunteer)