Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crontab Job Question

Status
Not open for further replies.

mundell

IS-IT--Management
Jul 11, 2000
22
0
0
US
Hello Everyone,

I am needing to make a cron job so that I can have my Redhat Linux 7.2 server everynight at certain time do tftp to a ip then do a put command to send file to a windows server what command in a cron job would I need to do this I have tried couple different things dosn't work. Can someone help out Thanks.

Robb
 
just see the poste that i write. up in the list !
 
It would help to know what didn't work :)

First, you could be having trouble with cron. That happenes sometimes because cron's environment is not the same as yours, so commands that work in your shell don't work from cron. There are simple ways to be sure that doesn't happen such as using full path names for all command and explicitly setting environment variables. See for more details.

Or perhaps your problem is using ftp from a script. There aere actually numerous ways to do that. If you script is complex, I'd use Kermit.




but simple tasks can be done directly with .netrc files:
has examples of using that, and even more simole tasks can often be done just with "here" files:

HOST=xxx
FTPUSER=xxx
FTPPASSWORD=xxx
ftp -n $HOST <<-EOF
user $FTPUSER $FTPPASSWORD
cd /wherever
bin
prompt off
mget '*'
bye
EOF





Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top