Preface The following are the ways to implement Linux scheduled tasks: cron, anacron, at, etc. cron is the service name, crond is the background process, and crontab is a customized scheduled task table. However, I learned a lot today. I have been using crontab for so long and I just realized that I need to start it. Added a scheduled task but it doesn't work well [root@dev-gl-lh1 ApiAgent]# cat /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # For details see man 4 crontabs # Example of job definition: # .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | .---------- day of month (1 - 31) # | | | .------- month (1 - 12) OR jan,feb,mar,apr ... # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat # | | | | | # * * * * * user-name command to be executed # Cache coin mapping data */5 * * * * root /usr/bin/php /data/application/SwooleMoney/script/bin/cli.php CacheData cacheCoinMap # Cache transaction pair information*/1 * * * * root /usr/bin/php /data/application/SwooleMoney/script/bin/cli.php CacheData cacheSymbol # Delete depth data*/1 * * * * root /usr/bin/php /data/application/SwooleMoney/script/bin/cli.php CacheData clearExchangeDepths >/tmp/clearExchangeDepths.log ~ ~ The script is executed every minute, but the log is not displayed until the flowers are all gone. # Check crontab status [root@dev-gl-lh1 ApiAgent]# /etc/init.d/crond status crond dead but pid file exists # Start crontab service [root@dev-gl-lh1 ApiAgent]# /etc/init.d/crond start Starting crond: OK, the log output shows that the script was successfully executed, and I learned a lot. Reference address: https://www.jb51.net/article/154290.htm 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:
|
<<: Let's talk about my understanding and application of React Context
>>: MySql index detailed introduction and correct use method
When the user's home directory becomes larger...
Use of v-on:clock in Vue I'm currently learni...
Technical Background Latex is an indispensable to...
Table of contents JS obtains the .txt file conten...
It's easy to send messages to other users in ...
Here is a common one-click performance test scrip...
In real life, a lock is a tool we use when we wan...
1. Target environment Windows 7 64-bit 2. Materia...
Transactions in MySQL are automatically committed...
Through permission-based email marketing, not onl...
1. Go to the official website: D:\mysql-5.7.21-wi...
Table of contents introduce 1. Pica 2. Lena.js 3....
Adobe Brackets is an open source, simple and powe...
When faced with a SQL statement that is not optim...
In the vue scaffolding, we can see that in the ne...