Home > Hosting > Server

What are the differences between at and crontab in linux?

2023-11-20 14:39:00

<p>Designed for programming, automatic code writing robot, free to open. What are the differences between at and crontab in this linux article? Most people don&#39;t quite understand it, so Xiaobian summarizes the following contents, with detailed contents and clear steps, which has certain reference value. I hope everyone can gain something after reading this article. Let&#39;s take a look at what are the differences between AT and crontab in this linux article.</p><p>The differences between at and crontab in linux are as follows: 1. The operation mode is different, at only runs once, while crontab runs circularly; 2. Depending on different services, at corresponds to atd, while crontab corresponds to crond;; 3. at is generally a temporary task, while crontab is generally a periodic task.</p><p>Operating environment of this tutorial: linux7.3 system and Dell G3 computer.</p><p>The difference between at and crontab in linux</p><p>Different operation modes</p><p>At only runs once, and crontab runs circularly.</p><p>Dependent services are different</p><p>The service corresponding to at is atd.</p><p>The service corresponding to crontab is crond.</p><p>At is generally a temporary task, while crontab is generally a periodic task.</p><p>At instruction</p><p><img src="//img.freeonlinedomain.com/uploads/allimg/20231120/1-231120144G23Y.jpg" title="" alt="51252_副本.jpg"/></p><p>Pay attention to the following when performing at:</p><p>1 Check whether the user has the permission of at.</p><p>If the /etc/at.allow file exists in the system, the user name existing in it will have at permission.</p><p>If the /etc/at.deny file exists in the system, the user name existing in it will have no at permission (generally, the open source system defaults to the deny file, and it is empty).</p><p>If the above files do not exist in the system, only the root user can use the at permission.</p><p>Check whether atd service has been started.</p><p>service&nbsp;atd&nbsp;status</p><p>Crontab instruction</p><p>Linux automatic execution instructions crontab and at</p><p>When executing crontab, you need to pay attention to the following: (In fact, it is the same as at)</p><p>1 Check whether the user has crontab permission.</p><p>If the /etc/cron.allow file exists in the system, the user name existing in it will have cron permission.</p><p>If the /etc/cron.deny file exists in the system, the user name existing in it will not have cron permission (generally, open source systems default to the deny file, and it is empty).</p><p>If the above files do not exist in the system, only the root user can use cron permissions.</p><p>Check whether atd service has been started.</p><p>service&nbsp;crond&nbsp;status</p><p>The above is the content of this article about the difference between at and crontab in linux. I believe everyone has a certain understanding. I hope that the content shared by Xiaobian will be helpful to everyone. If you want to know more about the relevant knowledge, please pay attention to the billion-speed cloud industry information channel.</p><p>Ask AI for details</p>


Copyright Description:No reproduction without permission。

Knowledge sharing community for developers。

Let more developers benefit from it。

Help developers share knowledge through the Internet。

Follow us