Crontab failure Solution

Source: Internet
Author: User
Crontab failure solution-general Linux technology-Linux programming and kernel information. The following is a detailed description. Two days ago, it was okay to rewrite an Rman backup script and directly execute the SHELL. However, it never takes effect after loading with Crotab. After looking for half a day, I found that the Oracle environment variable was being referenced. The following is a summary:

1. environment variables:

The following three variables are indispensable. The other variables do not matter:

Export ORACLE_HOME =/your dir
Export ORACLE_SID = your sid
Export PATH = $ ORACLE_HOME/bin: $ PATH

2. This script must be set to the + x mode.

3. crontab Syntax:
There are 6 domains, which are indispensable. 0 and 00 have the same effect.

4. After the automatic execution is completed, you do not need to restart the crond service. It only needs to be on. crond will automatically search for files under/cron every minute.

5. after crontab-e is used, you can see an oracle file under/var/spool/cron/(for unix, this file is located under/var/spool/cron/crontabs ). Otherwise, it must have been your crontab error.

After the time, no matter what the execution is like, there will be a file with the same user name under/var/mail, where the execution result is.

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.