Crontab - entry not working , cron job not running


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Crontab - entry not working , cron job not running
# 1  
Old 11-13-2014
Crontab - entry not working , cron job not running

I have put a cron entry in oracle user for taking hot backup every wednesday@ 2.30 AM and have given the cron entry

Code:
30 02 * * 3 /u01/vijay/hotbackupcron 2>&1 >> /u01/vijay/hotbackup.log





also find below the script inside hotbackupcron, i have put in env variables as well


Code:
#!/bin/bash
ORACLE_BASE=/u02/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/test; export ORACLE_HOME
ORACLE_SID=test; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
 
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
cd /u01/vijay
sqlplus -s /nolog <<EOF
conn / as sysdba
@hotbackup
exit
EOF

---------------------------------------------------------------------------------------------------------------------------------------------------------------------

This cron entry is not working at the specified time, please let me know what is the mistake I am doing
# 2  
Old 11-13-2014
Does it work at all? When does it run?
# 3  
Old 11-13-2014
Did you have a look at the cron logs? Who is executing this crontab? No mail?
I see a few things but interested in knowing what cron says first...

And is cron services activated?...

Last edited by vbe; 11-13-2014 at 05:41 AM..
# 4  
Old 11-13-2014
It doesnot run at the time and it never runs as i see the log file is not even being created

---------- Post updated at 05:13 AM ---------- Previous update was at 05:12 AM ----------

Yes no mail. the user is oracle. the log file is not being created.

can you help me fixing this.
# 5  
Old 11-13-2014
Does user oracle have the permissions to write that log file? Do you receive oracle's mails? Can you check the system logs and post the result?
# 6  
Old 11-13-2014
Yes oracle user has the permission to write in that log.

but no log file is even created which means it didn't run at all.

how to check system log+ also we dont receive mails
# 7  
Old 11-13-2014
Does ps show a *cron process? If not, start the service.
Run
Code:
grep cron /var/log/messages

and post a few last lines of the result.
Put
Code:
MAILTO=< your account>
*/5 * * * * pwd

into the crontab (if that construct is allowed on your system), check your mails and report back.
This User Gave Thanks to RudiC For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Cron entry not running

Hi I have one entry in my crontab that do not run, in cron, but it runs manually: 53 7 * * * /moneta_polled01/download/./get_dealer.sh 55 7 * * * /moneta_polled01/download/./mov_dealer.sh The first entry do not run automatically, but it runs manually. The second entry runs... (12 Replies)
Discussion started by: fretagi
12 Replies

2. Shell Programming and Scripting

Checking crontab job entry in 3 different hosts

Hi Gurus, I am trying to connect to remote host from current host to check crontab entries. I have started like this ssh -n -l db2psp 205.191.156.17 ". ~/.profile >/dev/null 2>/dev/null; cd log ;ls | wc -l" I got this error ? ssh: connect to host 205.191.156.17 port 22:... (1 Reply)
Discussion started by: rocking77
1 Replies

3. Shell Programming and Scripting

Cron JOb Entry

Hi All, i have a folder in a server say xxx.xx.xx.xx\abcd\efgh. i want to make a cron job entry so that i would get a mail (me@example.com) on business days. will this help me... 30 4 * * 1-5 cd \abcd\efgh|ls-ltr|mailx:me@example.comhttps://www.unix.com/images/editor/code.png (10 Replies)
Discussion started by: mahesh300182
10 Replies

4. Solaris

Cron job running even after cron is removed

Hi , I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility ) I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Discussion started by: chidori
4 Replies

5. Solaris

crontab entry not working

Hi, I have added the script entry into crontab by using crontab -e. 30 * * * * /scripts/info.pl $HOME/GCSS/logs > /dev/null 2>&1 But its not working yet. Note: When i was added the script by the time I have faced issue as below 1) If I use crontab -l then i got cant open the script. ... (2 Replies)
Discussion started by: Mani_apr08
2 Replies

6. Shell Programming and Scripting

How to add cron job in /etc/crontab

Hi, How to add a cron job in /etc/crontab using a shell script.??:confused: Actually the requirement is we need to run a script say, XXX.sh every 10 min through “cron”. That can be achieved by adding the below code line in the /etc/crontab , (i.e., “crontab -e ” command to add this to the... (4 Replies)
Discussion started by: Dedeepthi
4 Replies

7. UNIX for Dummies Questions & Answers

Crontab entry is not working

Hi I am trying to test the crontab entry by setting time as below ( set ahead more than 3min before saving the cron) crontab entry: 30 15 1-27 * * && (cd /scripts;./script.csh.prod.UAT /dev/null 2>&1) But this is not working, but below one is working. 30 15 1-27 * * (cd... (1 Reply)
Discussion started by: jramesh1
1 Replies

8. UNIX for Dummies Questions & Answers

Need to Setup cron entry in Crontab

how to schedule a job in cron on last sunday of every month?:mad: (1 Reply)
Discussion started by: tp2115
1 Replies

9. UNIX for Dummies Questions & Answers

perl crontab entry not working

Hi I have a perl script which used 'glance' command to return all the processes with the thread count. It is working fine when it is executed as a command, but as a crontab entry, the perl script is not getting executed. thdcnt.pl #!/usr/bin/perl my $cmd=`glance -bootup -adviser_only... (1 Reply)
Discussion started by: manaac
1 Replies

10. Shell Programming and Scripting

Cron job entry not running

Hi, I am facing this problem . My Cronjob entry is not running !!! I am having Sun solaris 9 and cronjob entry is "45 1 * * * /safedir/rdns/opt/RDNS1.1Scripts/drpl_audit_log_script.sh_orig > /dev/null 2>&1" Now when I try to look in the output log files it creates, it is some file with... (1 Reply)
Discussion started by: hkapil
1 Replies
Login or Register to Ask a Question