>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.
>
>
>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.

Did you try placing quotes for the command?

For example `/usr/localbin/scp /usr/localfile remotehost:/backup/`


Rick



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to