Script doesn't complete via Cron
Alexander Haderer
alexander.haderer at charite.de
Fri Sep 12 11:43:43 PDT 2003
At 14:26 12.09.2003 -0400, Gerard Samuel wrote:
>...
>scp -q foo.zip server_name:
>rm -rf foo_dev foo.zip
>
>------
>
>Cron job ->
>------
># export, zip up and scp foo source to server_name
>17 14 * * * /home/bar/bin/export-foo
>2> /dev/null > /dev/null
>------
>
>When I execute the script by hand, it completes without any problems.
>When I let a cronjob handle it, it doesn't scp the zip file to the remote
>server.
>I don't get any errors in /var/log/auth.log or /var/log/messages
>Anyone has any ideas on how to fix this up?
We had a similar problem with scp if I remember right. The problem was the
remote server where a message was echoed during login with ssh (some echo
stuff in the .profile or something like this). It seemed to be that scp got
this echo-message too and then failed to operate. After removing the echo
commands everything worked fine.
Note: I may be wrong, its long time ago.
Alexander
--
------------------------------------------------------------------
Alexander Haderer Charite
Campus Virchow-Klinikum
Tel. +49 30 - 450 557 182 Strahlenklinik und Poliklinik
Fax. +49 30 - 450 557 117 Sekr. Prof. Felix
Email alexander.haderer at charite.de Augustenburger Platz 1
www http://www.charite.de/rv/str/ 13353 Berlin - Germany
------------------------------------------------------------------
More information about the freebsd-questions
mailing list