|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
rcp command is not working in crontab
Dear Friends, I am trying to copy SAP log file from one HPux server1 to another HPux server2 remotely through one script. following command has written in the script. Code:
rcp -rp /oracle/PRD/sapreorg/*.dbf oraprd@drsite:/oracle/PRD/sapreorg Above command working fine from command mode. But whenever I try to execute it throu crontab it is not working. Please help. Thanks & Regards, Bhagawati Pandey Last edited by Scrutinizer; 09-27-2012 at 04:34 AM.. Reason: code tags |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Hello, What is the output of cron command? Please see /var/adm/cron/log. Regards
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Please post the line from crontab , the Operating System and version, the whole script, and any output seen in unix mail for the owner of the cron.
Is the owner of the crontab the same user as the interactive user. If not, has the remote system been configured to allow rcp from the owner of the crontab? (e.g. with an entry in a .rhosts file or similar)? Last edited by methyl; 09-27-2012 at 10:17 AM.. |
|
#4
|
|||
|
|||
|
Hi,
Output of the /var/adm/cron/log is >CMD: /oracle/PRD/scripts/logshipment.sh >oraprd 2900 c Wed Sep 26 14:15:00 IST 2012 <oraprd 2900 c Wed Sep 26 14:18:00 IST 2012 Regards ---------- Post updated at 11:38 AM ---------- Previous update was at 11:31 AM ---------- Line from cron is as under 15 1,5,10,14,20,23 * * * /oracle/PRD/logshipment.sh Operating system is hp_ux 11.31 ia64 Regards, |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
Try this in crontab Code:
15 1,5,10,14,20,23 * * * /bin/sh /oracle/PRD/logshipment.sh If it doesn't work, just after the first line (i.e. #!/bin/sh) of logshipment.sh, put these lines Code:
touch /tmp/this_is_a_test exit 0 Keep us in touch. Regards |
| Sponsored Links | |
|
|
#6
|
|||
|
|||
|
The default Shell for HP-UX cron is already /bin/sh - which is the Posix Shell.
We can deduce that the crontab is owned by user "oraprd", and that the cron apprently ran for 3 minutes without the script failing as such. Is there anything in /var/mail/oraprd ? This is where any output from the script will be found. Unless it is just the one line already posted, please post the actual contents of: /oracle/PRD/logshipment.sh When you ran from the command line, were you logged in as user "oraprd"? |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Crontab not working, please help | samantha13 | UNIX for Advanced & Expert Users | 0 | 08-02-2012 12:25 PM |
| crontab is not working. | getrue | Solaris | 6 | 07-27-2011 12:34 AM |
| crontab not working | rajesh_hv | UNIX for Advanced & Expert Users | 4 | 10-28-2008 07:45 AM |
| crontab command not working | digant | UNIX for Advanced & Expert Users | 8 | 01-04-2004 08:46 PM |
| crontab not working right | kymberm | UNIX for Dummies Questions & Answers | 3 | 07-09-2003 04:21 PM |
|
|