| cron job not getting executed [message #425760] |
Mon, 12 October 2009 02:27  |
ankush_chawla Messages: 74 Registered: November 2006 |
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 #425763 is a reply to message #425762] |
Mon, 12 October 2009 02:38   |
ThomasG Messages: 1939 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  |
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]
|
|
|