cronjob not working

I created a file in /u01/oradata directory as cronjb.ksh which contains following script

30 12 * * * /export/home/oracle/u01/oradata/rman.ksh

'/export/home/oracle' is my root directory. I then moved cronjb.ksh file to my '/export/home/oracle' directory. i typed crontab cronjb.ksh. However my cronjob named cronjb.ksh does not run. I typed mail and i dont see any email. Below is my rman.ksh script. is there any command to findout why my cronjob not working?

[b]exec>/u01/oradata/bkup_$$.log 2>&1
ORACLE_HOME=/u01/app/oracle/product/10.2; export ORACLE_HOME
ORACLE_SID=SEED; export ORACLE_SID
PATH="$PATH:$ORACLE_HOME/bin"
rman target=/<<
EOF
run{
SHUTDOWN IMMEDIATE
STARTUP MOUNT
ALLOCATE CHANNEL ch1 device type disk FORMAT
'/u01//oradata/ora/%U';
BACKUP AS COMPRESSED BACKUPSET
DATABASE PLUS ARCHIVELOG;
SQL 'ALTER DATABASE OPEN';}
EXIT ;
EOF[/B

What os are you using? Do you have root?

Did you get an error when you added the crontab?

what does

crontab -l

show?

Have you checked your local email? Cron will mail any output/errors there.

It shows below

$ crontab-l
#!/bin/sh
15 12 * * * /export/home/oracle/u01/oradata/rman.ksh

yes i m top user in unix 'root'.

Please help.

Stop putting "#!/bin/sh" in your crontab files - it shouldn't be there

What he said.

It is still not working.

your cron entry will run this job at 12:15 PM. Is that what your expecting?

Have you checked the system cron log?

What OS are you using?

Have you checked your local email?

Please answer all of these questions.

Try to check your mail: enter 'mail' or 'mutt' or 'pine' command.
I bet that some error message was sent there.
Also, make sure that you don't rely on any executables that are in $PATH - when you start something from cron then $PATH and $TERM and ... could be empty :smiley: