Preface In LINUX, periodic tasks are usually handled by the cron daemon process [ps -ef | grep cron]. Cron reads one or more configuration files that contain command lines and the times they are called. The cron configuration file is called "crontab", which is short for "cron table". Cron is a scheduled execution tool under Linux that can run jobs without human intervention.
Find the problem The thing is that there is a crontab like the following on your own service 10 0 * * * root echo 'xxx' >> zzz Those who are familiar with it know that it is executed at 00:10 at night and outputs xxx to the zzz file But the problem is that this crontab is not executed at 00:10! Instead, it is executed at 12:10 noon. The crontab execution time is inconsistent with the system time! ! ! ! I remember the server time zone was changed and it is now CST time zone. There is no reason not to execute it! I tried to google crontab time zone, and I found several similar examples. It turns out that crontab must be restarted manually after the time is modified /etc/init.d/crond restart
There is another situation where the time zone is divided into two, one is timezone and the other is localtime. Follow the following command to solve it cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime service crond restart Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support for 123WORDPRESS.COM. You may also be interested in:
|
<<: How to use history redirection in React Router
>>: Solution to forgetting the root password of self-built MySQL in Alibaba Cloud Linux CentOS 7.2
--When connecting to the database, the matching r...
Install Filebeat has completely replaced Logstash...
Table of contents 1. Install and create an instan...
1. Pull the official 5.0.3 image [root@localhost ...
Table of contents background question Problem ana...
Preface I believe everyone is familiar with addin...
Due to the needs of the work project, song playba...
Table of contents 1. Component bloat 2. Change th...
Now .net core is cross-platform, and everyone is ...
Table of contents 1. What is a trigger? 2. Create...
[ Linux installation of Tomcat8 ] Uninstall Tomca...
<base target=_blank> changes the target fram...
Friends always ask me how to hide Linux processes...
This article describes a proposal for a metadata ...
1. Install mysql Run the following command to upd...