In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Today, I will talk to you about how to add daily scheduled tasks to linux. Many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
1. Crond is a command used by linux to execute the program on a regular basis. When the system is installed, the service will be started by default. Crond will regularly check whether there is any work that needs to be performed every minute. You can check the running status of this service through status.
2. The service can be stopped through the stop command, and the automatic execution plan added after shutting down the service will no longer be executed.
3. Restart the service through the restart command, and reload the configuration through reload. Here, you use the systemctl command because you are using redhat7.
4. Crond service provides crontab command to set scheduled tasks, and crontab command can view some parameter information through the-h command.
5. The syntax for crontab scheduling tasks is
Order for hours, days, months and weeks
0-59 0-23 1-31 11-120-6 command (value range: 0 indicates that a typical Sunday row corresponds to a task)
The following figure creates a simple scheduled task, where * represents all, / represents each
6. After execution, you can use-l to view the existing task plan. If you want to view the execution result, you can view it directly in the result file specified in the task.
7. There are two ways to add scheduled tasks, one is to add through crontab-e mentioned above, and the other is to add through / etc/crontab file.
After reading the above, do you have any further understanding of how to add daily scheduled tasks to linux? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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.