[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Newbie: cron.hourly problem

More Information:
The shell script files have executable permission, and the good one actually
gets run, but it does not do what I want.

I put in a "touch test.hourly" just to see that the script is run, and the
file is created.

Here is the shell script that I would like to have run once an hour.
The purpose is to move files into a Zope database using the 8021 ftp port.
It works perfectly perfect if I type "./movephotos.sh" at the prompt.

--- movephotos.sh --------
ncftpput -u goran -p MySecretPassword -P 8021 -R -DD \ /HomeWeb/photos2004 photos/*
touch test.hourly

Why does it not work when cron executes the file?


> Dear Group,
> I cannot get the cron to work the way I expect it to. (on a Sarge machine)
> (after having read the man pages, searched this list and googled)
> Maybe I misunderstood something...
> I put a shell script file in /etc/cron.hourly and I expected it to run
> an hour.
> the syslog tells me that cron does something:
> Mar 11 15:17:01 sigurd /USR/SBIN/CRON[23344]: (root) CMD (
>   run-parts --report
> /etc/cron.hourly)
> However, the shellscript is not run.
> The shellscript works fine when I type the name on the prompt.
> See below, the shellscript text.
> Any hints would be appreciated!
> Thanks,
>                 Goran
> ----shellscript in /etc/conf.hourly-------------------
> #!/bin/bash
> #
> # Move Photos
> cd ~goran
> bash movephotos.sh

Reply to: