[NCLUG] at command

Michael Dwyer mdwyer at sixthdimension.com
Thu Oct 24 17:03:21 MDT 2002


Matt Taggart wrote:
> Joshua SS Miller writes...
> 
> 
>>Anyone know in detail how the "at" command runs?  What I am looking for
>>is how does it que a job?  It almost seems that is sets up a temporary
>>cron job, but a friend of mine seem to think it creates a sleep loop?
> 
> 
> It's a separate daemon, atd.
> 
> man at, man atd, and poke around /var/spool/cron.

On some systems, yes.  In which case atd runs in a sleep loop.  On 
others, a cron task calls 'atrun' every five minutes (or so).  Atrun 
apears to be on the way out -- it is now a symlink to the atd command, 
with a flag which instructs it not to daemonize itself.

The former allows finer grained action.  The latter allows you to only 
run a cron daemon instead of both cron and atd.

The scripts are stored in /var/spool/atjobs.  The time seems to be 
indicated in the filename.  The contents of the file is the script you 
submitted, plus some things to redirect your output to the atspool and 
set up the environment.

If you have root on your own machine create a bugus at job and take a 
look at the file and filenames in /var/spool/atjobs.  That might serve 
to be more enlightening than the man pages...




More information about the NCLUG mailing list