![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| AIX and cron logs filtering ?: /etc/cronlog.conf, /var/adm/cron/log | Keith Johnson | AIX | 0 | 01-09-2008 05:32 PM |
| Script doesn't work, but commands inside work | cheongww | UNIX for Dummies Questions & Answers | 2 | 11-14-2006 07:52 PM |
| Command doesn't work under cron ? | bigjohn-nj | Shell Programming and Scripting | 4 | 01-20-2006 01:38 PM |
| script didn;t work in cron !!! @_@ | stancwong | Shell Programming and Scripting | 2 | 10-04-2005 06:25 AM |
| Simple cron job won't work | coregan | UNIX for Dummies Questions & Answers | 4 | 01-20-2004 02:22 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
ncopy doesn't work from cron
Hello,
I have put the following command in a shell script: ncopy /home/Selma/my_file server2\!INPUT/my_file userpassword (server2 is the remote machine) The script works fine when it is invoked manually, however when it is scheduled to be run from crontab ncopy doesn't work (all of the other commands work). Do you know what might be the problem? TIA, Selma |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Your problem is probably that you aren't putting in the path to ncopy. When running manually, you have a PATH variable (echo $PATH) which allows you to type in ncopy, and your PATH variable is used to find the ncopy command. When running in cron, your normal enviroment variables aren't there unless you specify them (or run your login profiles).
Use the which command to find where ncopy is ( $ which ncopy) - put the output into the script (it should come back with the correct path to ncopy). Always put the path in scripts - so you don't have these types of problems. |
|
#3
|
|||
|
|||
|
Yes, that was the problem! Thank you very much for helping.
I had been aware that full paths are needed in cron, but I had only been including them for files, not the commands. Up until now Thank you once again |
|||
| Google The UNIX and Linux Forums |