What is the difference between at and crontab in linux

WBOY
Release: 2022-07-11 15:56:50
Original
2020 people have browsed it

The difference between at and crontab in Linux: 1. The running methods are different, at only runs once, while crontab runs in a loop; 2. The dependent services are different, the service corresponding to at is atd, and the corresponding service to crontab crond when serving; 3. at is generally a temporary task, while crontab is generally a periodic task.

What is the difference between at and crontab in linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

What is the difference between at and crontab in linux

The difference between at and crontab

Different running methods

at only runs once , crontab runs in a loop

The services it depends on are different

The service corresponding to at is atd

The service corresponding to crontab is crond

at is generally a temporary task. Crontab is generally a periodic task

at command

What is the difference between at and crontab in linux

Attention needs to be paid when executing at:

1 Check whether the user has at permission

If the /etc/at.allow file exists in the system, the user name existing in it will have at permission

If /etc/at exists in the system .deny file, then the user name existing in it will not have at permission (generally open source systems give the deny file by default, and it is empty)

If the above file does not exist in the system, only the root user can Use at permissions

2 Check whether the atd service has been opened

service atd status
Copy after login

crontab command

What is the difference between at and crontab in linux

linux automatic execution command crontab and at

Note when executing crontab: (actually the same as at)

1 Check whether the user has crontab permissions

If /etc/cron exists in the system .allow file, then the user names existing in it will have cron permissions

If the /etc/cron.deny file exists in the system, then the user names existing in it will not have cron permissions (generally open source systems have It is given to the deny file by default, and it is empty)

If the above file does not exist in the system, only the root user can use cron permissions

2 Check whether the atd service has been turned on

service crond status
Copy after login

Recommended learning: Linux video tutorial

The above is the detailed content of What is the difference between at and crontab in linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template