Automatically execute the use of crontab under linux

 

Write and execute automatic execution scripts (to copy etc/*.conf files to the backup directory)

-----crontab -e

------:wq! Save and exit

------ crontab -l view the program being executed

------- systemctl restart crond restart the service (this step is the focus)

Write a loop execution command

-------while 

> ls -alt

>do

>sleep 3 ------Run in the background

>done

The results of the automatic execution are as follows:

Prohibit specific users from compiling crontab self-executing commands

Guess you like

Origin blog.csdn.net/weixin_45448980/article/details/114633810