How the command "at" works?

Karl Auer kauer at biplane.com.au
Sat Aug 6 02:10:13 UTC 2016


On Fri, 2016-08-05 at 20:27 -0500, Peng Yu wrote:
> I am asking how "at" works internally not how to use it. It seems man
> does not help much for this purpose.

If you read the "at" man page it says you should "see also" atd, and
that answers pretty much all your questions.

"at" is actually two parts - the user interface "at" and a daemon
"atd".

They communicate through job files: "at" puts jobs in a directory
(/var/spool/cron/atjobs), "atd" reads them out of there and runs them.

Each job file is an ordinary shell script (sh not bash!). It's mostly
commands to set the environment and change to the right directory; the
last lines are whatever you typed into "at".

You can find out more about atd through "man atd" and "systemctl status
atd". You might also want to check out at.allow and at.deny.

Interestingly, atd is started with the -f option, which is supposed to
run it in the foreground. Odd. It's definitely not in the foreground.

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B
Old fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4







More information about the ubuntu-users mailing list