Solved

Why my oracle crontab is not working?

Posted on 2009-04-02
2
653 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

717 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