Basic format of crontab task configuration
This article mainly introduces "the basic format of crontab task configuration". In daily operation, I believe many people have doubts about the basic format of crontab task configuration. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "basic format of crontab task configuration". Next, please follow the editor to study!
The basic format of crontab task configuration:
Minute (0-59) hour (0-23) date (1-31) month (1-12) week (0-6 for Sunday) order
Column 1 represents minutes 1: 59 per minute is represented by * or * / 1.
The second column represents the hour 1: 23 (0 means 0 o'clock)
The third column represents the date 1: 31
The fourth column represents the month from January to December.
The fifth column identification number is 0006 (0 means Sunday)
Column 6 commands to run
Every 3 minutes of execution is * / 3 * command1 every 30 minutes is * / 30 * command1
# the following is an example of a python program that is executed every 3 minutes
Crontab-e [root@nessus allpython2019] # crontab-root/allpython2019/1-FtpSwDownloadcfg20191101.py 3 * / usr/bin/python / root/allpython2019/1-FtpSwDownloadcfg20191101.py > > / root/allpython2019/run.log 2 > & 1 at this point, the study on the basic format of crontab task configuration is over. I hope I can solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!