?
Solved

Why my oracle crontab is not working?

Posted on 2009-04-02
2
Medium Priority
?
655 Views
Last Modified: 2013-12-19
Hi,
An oracle crontab to run some scripts are scheduled on our Sun Solaris 2.9 server.  However, the scripts are not being run as expected.  I've checked folder and file properties and did not find anything which may cause the crontab to fail.  Does anyone know where I can find the error as a result of the crontab to fail?  If a manually execute the script such as the cmms.bkp, it works.

Thanks!

Here's the oracle crontab:
[CMMS]$ crontab -l
 
#
# Custom FWI scripts
#
0,10,20,30,40,50 * * * 1-6 /export/home/oracle/cleanTS145 > /export/home/oracle/
cleanTS145.out
0 21 * * 0 /export/home/oracle/CMMSstats > /export/home/oracle/CMMSstats.log
0 21 * * 1-5 /opt/oracle/DBadmin/backup/cmms.bkp
0 21 * * 1-5 /opt/oracle/DBadmin/backup/camuse.bkp
0 20 * * 2-6 /opt/oracle/DBadmin/backup/deletedmp
10 22 * * 1-6 /export/home/oracle/tstables > /export/home/oracle/tstables.out

Open in new window

cmms.bkp.txt
0
Comment
Question by:Pacita_Tibay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 24057163
1 )
can you try changing as shown in the below entry just for one script cmms.bkp...

0 21 * * ( 1-5 /opt/oracle/DBadmin/backup/cmms.bkp >> /application/logs/cmms.bkp_cron_log.txt 2>&1 )

/application/logs/ --> change this accordingly as in your system to store logs to see whether this log file is having any errors or not

2) also request your UNIX SA to check whether cron daemon process/agent/listener/process etc requires a restart/awake or something of that sort because once it happened to me and once unix SA said "restarted the cron agent" and it worked fine for me.
0
 

Accepted Solution

by:
Pacita_Tibay earned 0 total points
ID: 24160457
Hi,
The root crontab was working fine so the problem does not seem to be related with the cron agent.
Anyway, the problem was solved.  The problem seem to be related to the oracle account, which is missing in the /etc/shadow file.  Once our SA updated the /etc/shadow file for the oracle account, then the oracle cron jobs are working.

Thanks,
Pacita
0

Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read about achieving the basic levels of HRIS security in the workplace.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question