Re: Automatic FTP problem in cron

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, 2007-09-11 at 23:38 -0600, Ashley M. Kirchner wrote:
> Quoting umair shakil <umairshakeel@xxxxxxxxx>:
> 
> > Cron Entry is :
> > */5 * * * * /opt/bin/ftp.sh 2> /tmp/error_log
> >
> > "/opt/bin/ftp.sh: line 3: ftp: command not found"
> 
>    Your shell script doesn't know where 'ftp' lives.  Best to put the  
> full path into place, '/usr/bin/ftp'

As an (easier to maintain?) option, modify your shell script to source
the appropriate /etc/bashrc and/or /etc/profile. Keep in mind the
(non-)interactive nature of these two. "man bash" for more details.

This will mean that when you re-configure path information, or want to
test a new program before trashing the old one, changes will be reduced
and can be more easily isolated. This is especially true if
the .bashrc/profile includes some tests for a user ID, like user test.

HTH
--
Bill

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux