System Administration Guide: Advanced Administration

Description of the at Command

Submitting an at job file involves:

  1. Invoking the at utility and specifying a command execution time.

  2. Entering a command or script to execute later.


    Note –

    If output from this command or script is important, be sure to direct the output to a file for later examination.


For example, the following at job removes core files from the user account smith near midnight on the last day of July.


$ at 11:45pm July 31
at> rm /home/smith/*core*
at> Press Control-d
commands will be executed using /bin/csh
job 933486300.a at Tue Jul 31 23:45:00 2001

Controlling access to the at Command

You can set up a file to control access to the at command, permitting only specified users to create, remove, or display queue information about their at jobs. The file that controls access to the at command, /etc/cron.d/at.deny, consists of a list of user names, one per line. The users listed in this file cannot access at commands.

The at.deny file, created during SunOS software installation, contains the following user names:


daemon
bin
smtp
nuucp
listen
nobody
noaccess

With superuser privileges, you can edit the at.deny file to add other user names whose at access you want to restrict.