Linux crontab does not run troubleshooting

Source: Internet
Author: User

Linux crontab does not execute troubleshooting Problem description: A crontab is configured on CentOS. If you want to execute it once a day, the configuration syntax is correct, but the program execution log cannot be found, so the program is not executed. Crontab configuration: [plain] 00 11 *** sh/opt/geo/search-task-2.0/bin/updateGeoIndex. sh solution: through Google, you can view the specific execution information of crontab through/var/spool/mail/root (user name, therefore, [plain] vim/var/spool/mail/root displays the following crontab execution log: [plain] set JAVA_HOME =/usr/local/java/jdk1.6.0 _ 35/opt/geo/search-task-2.0/bin/updateGeoIndex. sh: line 23: bin/search-task.sh: No such file or directory can be seen through the Log because the search-task.sh is not found, the original is search-tas The k. sh path is incorrect. After the path is modified, crontab runs successfully. If you find that crontab is not executed, You can first check the/var/spool/mail/root Log to determine the specific cause of failure.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.