Managing System Information, Processes, and Performance in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

Scheduling a Single Job With at

The at command enables you to schedule a job for execution at a later time. The job can consist of a single command or a script.

Similar to crontab, the at command allows you to schedule the automatic execution of routine tasks. However, unlike crontab files, at files execute their tasks once. They are then removed from their directory. Therefore, the at command is most useful for running simple commands or scripts that direct output into separate files for later examination.

Submitting an at job involves typing a command and following the at command syntax to specify options to schedule the time your job will be executed. For more information about submitting at jobs, see Submitting an at Job File.

The at command stores the command or script you ran, along with a copy of your current environment variable, in the /var/spool/cron/atjobs directory. The file name for an at job consists of a long number that specifies its location in the at queue followed by the .a extension, for example, 793962000.a.

The cron daemon checks for at jobs at startup and listens for new jobs that are submitted. After the cron daemon executes an at job, the at job's file is removed from the atjobs directory. For more information, see the at (1) man page.

For step-by-step instructions for scheduling at jobs, see How to Create an at Job.