Re: ssh2 and scp2 fails in crontab.

From: Neil W Rickert (rickert+nn_at_cs.niu.edu)
Date: 08/31/05


Date: Wed, 31 Aug 2005 01:28:17 GMT

Hans Blom <tocum2@yahoo.com> writes:

>I've written a few scripts that get files via scp2 and just touches a
>file at server with ssh2 to indicate successful download.
>The scripts run in Cshell.

Bad choice for scripting.

>Interactively they run like a charm and admiring myself in the mirror I
>put them into crontab for periodic running.
>And.... The little buggers fail. I get a $status of 1 (generic error).
>Anyone got any ideas what to do?

How are you handling authentication?

Host based authentication should work fine from cron. But password
based will give you problems, since there is no tty available for
prompting for a password (or a passphrase).



Relevant Pages

  • Re: cron/crontab ?
    ... > Some of these folders have scripts in them already. ... > executed hourly in the hourly.cron folder and it would be run by cron? ... > to say crontab isn't being called by the running crond? ... On a home computer you can't have a cron job that clean up things the last Sunday every month at 0300 or something ...
    (alt.os.linux)
  • Re: What exactly does cron task weekly do?
    ... Nobody should live hassle to run scripts manually. ... Getting the crontab lines exactly right can be a little tricky. ... Some people have better things to do rather than editing cron tabs manually. ... You two should better read rather than coming up with creative nerdy stuff like "click and drool", a completely manual, applescript based method was suggested to clear newbie. ...
    (comp.sys.mac.system)
  • Re: crontab Qs: what is "run-parts" & how 2 display all crontabs?
    ... man 5 crontab. ... run-parts is a small program that runs all the shell scripts in the ... scripts in /etc/cron.hourly/ on the first minute of every hour, ... for USER in bob fred joe xyzzy bill ted; ...
    (comp.os.linux.setup)
  • Re: crontab Qs: what is "run-parts" & how 2 display all crontabs?
    ... man 5 crontab. ... run-parts is a small program that runs all the shell scripts in the ... scripts in /etc/cron.hourly/ on the first minute of every hour, ... for USER in bob fred joe xyzzy bill ted; ...
    (comp.os.linux.misc)
  • [SLE] 9.0 : Crontab question
    ... I put some scripts in vscan's crontab: ... # DO NOT EDIT THIS FILE - edit the master and reinstall. ... But it seems that the hourly scripts don't run: ... grep vscan /var/log/messages gives: ...
    (SuSE)