Home » Infrastructure » Unix » cron job not getting executed (oracle 10.2.0.4, Sun 5.10 )
cron job not getting executed [message #425760] Mon, 12 October 2009 02:27 Go to next message
ankush_chawla
Messages: 136
Registered: November 2006
Senior Member
i really wonder why below job not getting executed .

30 01 * * * /u01/home/oracle/sql/histogram.sh >> /u01/home/oracle/sql/histogram.log
40 12 * * * /u01/home/oracle/sql/histogram.sh >> /u01/home/oracle/sql/histogram.log


$ more /u01/home/oracle/sql/histogram.sh
#!/bin/ksh
sqlplus sa/crmggnqa2135 @histogram_table_act_entry.sql
sqlplus sa/crmggnqa2135 @dbms_stats_intall.sql

I have check /var/cron/log but it shows no error
CMD: /u01/home/oracle/sql/histogram.sh >> /u01/home/oracle/sql/histogram.log
> oracle 2795 c Sun Oct 11 12:40:00 2009

However the log file is not present and histogram doesnt get created.
If i execute the histogram.sh manually it gets executed fine with no issue.

Please help

Regards
Ankush
Re: cron job not getting executed [message #425762 is a reply to message #425760] Mon, 12 October 2009 02:32 Go to previous messageGo to next message
Michel Cadot
Messages: 59291
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Try to remove space between >> and log file name.

Regards
Michel

[Updated on: Mon, 12 October 2009 02:32]

Report message to a moderator

Re: cron job not getting executed [message #425763 is a reply to message #425762] Mon, 12 October 2009 02:38 Go to previous messageGo to next message
ThomasG
Messages: 3100
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Also, now you only re-direct STDOUT. Try re-directing STDERR also with :

30 01 * * * /u01/home/oracle/sql/histogram.sh 1>>/u01/home/oracle/sql/histogram.log 2>&1
Re: cron job not getting executed [message #426592 is a reply to message #425760] Fri, 16 October 2009 15:29 Go to previous message
scripter
Messages: 6
Registered: October 2009
Location: India
Junior Member
Hello ankush,

Issue with you crontab

set ORACLE_HOME and path variables in script

Search google for "unix crontab configuration+ORACLE_HOME"

Regards
Scripter

[Updated on: Fri, 16 October 2009 15:30]

Report message to a moderator

Previous Topic: Oracle code in Unix script
Next Topic: calling procedure in shell script (merged)
Goto Forum:
  


Current Time: Wed Oct 01 13:59:35 CDT 2014

Total time taken to generate the page: 0.08948 seconds