atd command in Linux



The at daemon, commonly referred to as atd is a background service that allows you to manage your at scheduled jobs on the system. These jobs are one time-tasks that you want to run at a specific time in the future.

You can use the at utility to schedule the jobs or tasks, such as running commands or executing scripts. After that, the atd daemon ensures that these scheduled jobs must be executed at their specified times.

Syntax for atd Command in Linux

The basic syntax for the atd command on Linux is provided below −

atd [-l loads_avg] [-b bathc_interval] [-d] [-f] [-s]

Here,

  • -l specifies a limiting load factor. The batch jobs will not run if the system load exceeds the specified factor.
  • -b sets the minimum interval between the start of two batch jobs and is measured in seconds.
  • -d enables the debug mode.
  • -f runs the atd daemon in the background.
  • -s processes the at or batch queue only once and is useful for compatibility with the older versions.

How to use atd Command in Linux?

You can use the atd command in Linux to −

Starting atd Daemon

If you want to start the atd daemon in your current session, you can use the systemctl or service commands. The systemctl and service

To start atd daemon on Linux from the systemctl command, run the following command −

sudo systemctl start atd
atd Command Linux 1

Alternatively, you can also use the below-given service command to start atd daemon on Linux −

sudo service atd start

Stopping atd Daemon

If you want to stop the atd daemon service on your Linux system, you can use the below-given systemctl command −

sudo systemctl stop atd
atd Command Linux 2

Or use the following service command to stop the atd daemon service on the system −

sudo service atd stop

Enabling atd Daemon at Boot Time

You can also enable the atd daemon to run at boot time when your system restart, it can be done either by using the below-given systemctl command −

sudo systemctl enable atd
atd Command Linux 3

Or using the below-given chkconfig command, which may work on some Linux systems −

chkconfig atd on

Restarting atd Daemon

To restart atd daemon on your Linux system, use the systemctl command with the restart argument provided below −

sudo systemctl restart atd
atd Command Linux 4

Or, use the following service command with the restart keyword to restart the atd daemon service on a Linux system −

sudo service atd restart

Checking Status of atd Daemon

If you want to check the atd daemon status whether it is running actively or causes any issues, you can use the following command −

sudo systemctl status atd
atd Command Linux 5

Alternatively, the following service command can also be used to check the status of atd daemon on a Linux system −

sudo service atd status

That’s how you can work the atd command and run your batch jobs with the at utility on your Linux systems.

Conclusion

The atd is a background service that manages you at jobs on a Linux system. This guide has provided commands to manage the atd, such as starting, stopping, enabling, restarting and checking the status of the service on the system.

These services commands can easily be run through the systemctl or service commands, as both of them will do the same tasks. You can use any of these commands and execute them according to your needs. Doing this will help you efficiently manage your at jobs on your Linux system.

Advertisements