On Wed, 2002-03-06 at 03:07, 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/ > Hi vincent,
If this is the system crontab file (/etc/crontab), you need to follow up the time fields with a username, then the command, like this: 30 23 * * * root /usr/localbin/scp /usr/localfile remotehost:/backup/ The command will run as the specified user. If it's not the system crontab, make sure that the owner of the crontab has sufficient privileges to execute the command. That's all I can think of for now, good luck! -- Trevor Hamm _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list