MAILTO=root 30 23 * * * /usr/localbin/scp /usr/localfile remotehost:/backup/
It should run at 11:30 PM every day and mail root the output. Set it up as root with crontab -e. Test crond with something like : * * * * * /bin/touch /tmp/crontest and see if the file is created. If not run : service crond restart and try again. steve -----Original Message----- From: Ben Logan [mailto:[EMAIL PROTECTED]] Sent: 06 March 2002 11:44 To: [EMAIL PROTECTED] Subject: Re: run backup script by cron question Hello, On Wed, Mar 06, 2002 at 01:07:58AM -0800, vincent li wrote: > hi, folks > > i use scp to backup local file to remote machine > without asking authorization by distributing the > publica key,i can run it successfully at command > line,for instance > > #/usr/localbin/scp /usr/localfile remotehost:/backup/ > > but when i put it at crontab, it does not work, i do > check the cron log, and can see the log record, but > localfile is not copied to remotehost,please help me > > my crontab like this: > 30 23 * * * /usr/localbin/scp /usr/localfile > remotehost:/backup/ Did you add the above to your crontab or root's crontab? Also, cron should send an email containing any output from the command(s) to the owner of the crontab. That might give you some clues about why it isn't working. HTH, Ben -- Ben Logan: ben at wblogan dot net OpenPGP Key KeyID: A1ADD1F0 FORTUNE PROVIDES QUESTIONS FOR THE GREAT ANSWERS: #19 A: To be or not to be. Q: What is the square root of 4b^2? _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list