System Administration Guide: Advanced Administration

ProcedureHow to Remove at Jobs

Before You Begin

Become superuser or assume an equivalent role to remove an at job that belongs to root or another user. Roles contain authorizations and privileged commands.

You do not need to become superuser or assume an equivalent role to remove your own at job.

  1. Remove the at job from the queue before the job is executed.

    $ at -r [job-id]

    where the -r job-id option specifies the identification number of the job you want to remove.

  2. Verify that the at job is removed by using the at -l (or the atq) command.

    The at -l command displays the jobs remaining in the at queue. The job whose identification number you specified should not appear.

    $ at -l [job-id]

Example 8–9 Removing at Jobs

In the following example, a user wants to remove an at job that was scheduled to execute at 4 a.m. on July 17th. First, the user displays the at queue to locate the job identification number. Next, the user removes this job from the at queue. Finally, the user verifies that this job has been removed from the queue.

$ at -l
897543900.a	Sat Jul 14 23:45:00 2003
897355800.a	Thu Jul 12 19:30:00 2003
897732000.a	Tue Jul 17 04:00:00 2003
$ at -r 897732000.a
$ at -l 897732000.a
at: 858142000.a: No such file or directory