In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
In this article, the editor introduces in detail the "Linux VPS planning task crond command how to use", the content is detailed, the steps are clear, and the details are handled properly. I hope that this "Linux VPS planning task crond command how to use" article can help you solve your doubts, following the editor's ideas slowly in depth, together to learn new knowledge.
First, installation planning tasks
This program may not be preinstalled on some systems and needs to be installed by executing the following command.
Yum install-y vixie-cron
Then start the service
Service crond start
Second, set up scheduled tasks
(1) execute the following command to set the scheduled task:
Crontab-e
The reason for using the above command rather than directly using vi is that cron does a small but necessary syntax check.
(2) set the specification for scheduled tasks:
T1 t2 t3 t4 t5 program
T1 means minutes.
T2 represents hours.
T3 indicates the day of a month.
T4 represents the month
T5 represents the day ordinal of a week.
Program represents the program to run.
(3) some examples:
Execute / bin/ls once a month at the 0th minute of every hour:
0 * / bin/ls
/ usr/bin/backup is performed every 20 minutes from 6 a.m. to 12:00 every December:
* / 20 6-12 * 12 * / usr/bin/backup
Send a letter to alex@domain.name at 5:00 every day from Monday to Friday:
0 17 * * 1-5 mail-s "hi" alex@domain.name < / tmp/maildata
00:20, 02:20, 04:20 every day of the month. . Execute echo ""
200-23max 2 * echo ""
The date command is executed every two hours between 11:00 and 8am, and at 8am.
023-7bat 2pm 8 * date
After reading this, the article "how to use crond commands for Linux VPS Planning tasks" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself to understand it. If you want to know more about related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.