Linux crontab does not execute problem solving method

Source: Internet
Author: User
Tags mail

Linux crontab do not perform problem troubleshooting

Problem Description:

A crontab is configured on the CentOS, so that it executes once a day, the configuration syntax is fine, but the log that the program executes is not found, so the program is not executed.

The crontab configuration is as follows:

[Plain]

* * * * sh/opt/geo/search-task-2.0/bin/updategeoindex.sh

Solution:

Through Google, you know that you can view crontab specific execution information through/var/spool/mail/root (user name), so

[Plain]

Vim/var/spool/mail/root

See Crontab's execution log as follows:

[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

Through the log can be seen because the search-task.sh is not found, the original is search-task.sh path problems, modify the path, Crontab successfully run.

So if you find that the crontab does not execute the problem, you can first go to see the/var/spool/mail/root log, to determine the specific failure reasons.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.