cron jobs

Hi,

please help on this am trying to exec the below mentioned cron jobs
but its getting failed fro the past two days

###but when am trying to execte the cron by the times

23,29 18 * * * /export/home/inrvgo/thelak/China.sh

its getting exec properly

please help on this

# Crontab for Hourly Update.
00,05,10 06 * * * /export/home/inrvgo/thelak/China.sh

Waiting for the earliest response:)

thanks in advance.

hi,

Format of crontab: Minutes Hour DayofMonth Month Day

For everyhour the mins has to be zero and hour is every hour something like this:

0 * 6 10 wed china.sh

hope it works!

00,05,10 should be 0,5,10.

Try that and let us know.

---------- Post updated at 05:42 ---------- Previous update was at 05:41 ----------

dragon - you can concatenate minute values (or any value) with commas.

Is the problem:

a) The cron not running at the correct time. If so, what is the correct time required?

b) Both crons failing. If so, the error should be in the mail messages for the owner of the cron (or root mail if it is a system cron).

c) One cron failing and one cron working. If so, can we see any error messages and the contents of the script?

1 Like

i left for the day eventhough

the system errors in the root mail as

file not found:could not open the txt file ...
mean while without changing any thing in the files i simply changed crontab entry by changing the time then its running

Hope it will gives u clear picture

---------- Post updated 10-07-10 at 11:46 AM ---------- Previous update was 10-06-10 at 08:32 PM ----------

export/home/inrvgo/thelak/SQL.sh[2]: sqlplus: not found.
A file or directory in the path name does not exist.
/export/home/inrvgo/thelak/China.sh[7]: /export/home/inrvgo/thelak/Daily_Check10-07-2010-05.txt: 0403-016 Cannot find or open the file.

its displaying the above message note(only at the time stamp 00,05,10 06 ***)

Please help on this tomarrow i have to move this to production

---------- Post updated at 01:34 PM ---------- Previous update was at 11:46 AM ----------

any one help on above

Updates like the last one you posted are considered as "Bumping" read the rules again!

---------- Post updated at 10:13 ---------- Previous update was at 10:09 ----------

There are many things by the look at the last submission, like are you sure you gave us all the information - We dont know what is in your script!
Is it calling sqlplus? In that case you havent set the evironment properly (test: does the script work in interactive mode e.g. when I execute it, and not in batch mode?...)

HI,
I executed in interactive mode its working properly and i'am receving the mail.
I executed in batch mode and its also working fine with (21 18 * * * <File path>
I Executed in batch mode like (50 05 * * * <file path>) with this its displaying the above mentioned error

Can you show us waht is in the scripts:

/export/home/inrvgo/thelak/SQL.sh
/export/home/inrvgo/thelak/China.sh

And your Oracle environment.
The output from this command sequence when executed interactively from an account where the script works:

set | grep "ORA"
set | grep "PATH" | grep -v "MANPATH"

HI methyl,
Its fine working with your solution thanks

---------- Post updated 10-09-10 at 08:14 AM ---------- Previous update was 10-08-10 at 10:03 AM ----------

Hi,
As i mentioned above my cron job is failing when i run as a batch in specific interval @ 30 8 * * * /export/home/inrvgo/thelak/China.sh

But if i tried the same batch by changing the time stamp in crontab its working
@24 18 * * * /export/home/inrvgo/thelak/China.sh

its simply calling two child scripts
here am giving the decode of the file
#!/bin/ksh
rm -f *.txt
#/home/insivs/sql/thilak/SQL.sh
/export/home/inrvgo/thelak/SQL.sh
/export/home/inrvgo/thelak/disk.sh >> Daily_Check`date +"%m-%d-%Y-%H"`.txt
< /home/insivs/sql/thilak/Daily_Check`date +"%m-%d-%Y-%H"`.txt
mailx -s "Daily Monitoring Check " thelak.kumar@abc.com, "in.finacle.china.support@abc.com","Gopalakrishnan.Venkatesan@abc.com","Muthu.Kumar@abc.com" < /export/home/inrvgo/thelak/Daily_Check`date +"%m-%d-%Y-%H"`.txt
----------------------------------------------------------------------

when i tried this at 30 8 * * * /export/home/inrvgo/thelak/China.sh
it displays error
/export/home/inrvgo/thelak/SQL.sh[2]: sqlplus: not found.
A file or directory in the path name does not exist.
/export/home/inrvgo/thelak/China.sh[7]: /export/home/inrvgo/thelak/Daily_Check10-09-2010-08.txt: 0403-016 Cannot find or open the file.

when it get success it displays like this

produced the following output:
/export/home/inrvgo/thelak/SQL.sh[2]: sqlplus: not found.

Please help on this :o

1 Like