Forrest logo
tool overview
On this page you find all important commands for the CLI tool at. If the command you are looking for is missing please ask our AI.

at

The at command line tool is used to schedule commands or scripts to be executed at a specific time. It allows you to specify a time and date for a command to run only once. The syntax for using at is as follows:

at <time> [date]

Here, <time> represents the time of execution in 24-hour format (HH:MM), and [date] is an optional parameter that specifies the date. If the [date] parameter is omitted, the command is scheduled to run on the current day.

Once the at command is invoked, it opens an interactive shell where you can enter the command(s) to be executed. The commands can be shell commands, shell scripts, or any executable files. Pressing Ctrl+D or typing EOF terminates the input.

Once the command is scheduled, it is stored in the at queue and executed automatically at the specified time. The output of the scheduled command is sent via email to the user who scheduled the command.

You can list the scheduled tasks using the atq command and remove a scheduled task using the atrm command, followed by the job number.

The at command is useful when you want to automate tasks at specific times, such as running backups, generating reports, or performing routine maintenance tasks.

List of commands for at:

  • at:tldr:0b97d at: Execute a script at the given time.
    $ at ${hh:mm} -f ${filename}
    try on your machine
    explain this command
  • at:tldr:60d81 at: Open an `at` prompt to create a new set of scheduled commands, press `Ctrl + D` to save and exit.
    $ at ${hh:mm}
    try on your machine
    explain this command
  • at:tldr:8f1a9 at: Execute commands from standard input in 5 minutes (press `Ctrl + D` when done).
    $ at now + 5 minutes
    try on your machine
    explain this command
  • at:tldr:99359 at: Execute commands from a given file next Tuesday.
    $ at -f ${filename} 9:30 PM Tue
    try on your machine
    explain this command
  • at:tldr:a8ea2 at: Execute the commands and email the result using a local mailing program such as Sendmail.
    $ at ${hh:mm} -m
    try on your machine
    explain this command
tool overview