The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
at vs cronjob mokkan SUN Solaris 1 05-16-2008 11:50 PM
cronjob wiz83 UNIX for Dummies Questions & Answers 1 01-25-2008 02:47 AM
sftp not working as cronjob tungaw2004 UNIX for Dummies Questions & Answers 3 01-10-2008 08:27 PM
cannot run cronjob shahrahulb UNIX for Advanced & Expert Users 3 10-28-2004 09:45 AM
Cronjob gerwhelan Shell Programming and Scripting 4 12-14-2001 06:17 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-10-2008
manna manna is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 40
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
  #2 (permalink)  
Old 01-10-2008
frank_rizzo frank_rizzo is offline Forum Advisor  
Resident BOFH
  
 

Join Date: Dec 2007
Posts: 425
What os are you using? Do you have root?

Did you get an error when you added the crontab?

what does
Code:
crontab -l
show?


Have you checked your local email? Cron will mail any output/errors there.
  #3 (permalink)  
Old 01-10-2008
manna manna is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 40
It shows below

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

Quote:
Originally Posted by frank_rizzo View Post
What os are you using? Do you have root?

Did you get an error when you added the crontab?

what does
Code:
crontab -l
show?


Have you checked your local email? Cron will mail any output/errors there.
  #4 (permalink)  
Old 01-10-2008
manna manna is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 40
yes i m top user in unix 'root'.
  #5 (permalink)  
Old 01-10-2008
manna manna is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 40
Please help.
  #6 (permalink)  
Old 01-10-2008
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline Forum Advisor  
Disorganised User
  
 

Join Date: Nov 2007
Location: New Zealand
Posts: 922
Stop putting "#!/bin/sh" in your crontab files - it shouldn't be there

Quote:
Originally Posted by frank_rizzo
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.
What he said.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:00 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0