[wplug] cron ?

Tom Rhodes trhodes at FreeBSD.org
Thu May 15 19:20:02 EDT 2008


On Thu, 15 May 2008 18:10:06 -0400
"Brian A. Seklecki" <lavalamp at spiritual-machines.org> wrote:

> 
> 
> On Thu, 2008-05-15 at 16:49 -0400, JAMES DISKIN wrote:
> > Why won't this cron job work?
> > 
> > Here's the crontab
> 
> Set the: MAILTO= line in the cron file at the top and get the output
> 
> Also, chmod +x /home/administrator/cdto.sh
> 
> Also, make sure "#!/bin/sh" is the 1st line in the file.
>    and/or
> 
> Prefix the path to the file with /bin/sh to explicitly indicate the
> command line interpreter.

I don't see a PATH either.  Depending on your shell type,
it may not know where "cd" and "find" is.

You can add a "set -x" at the top to get debugging output.

And everything else that Brian said.

> 
> ~BAS
> 
> > $ crontab -l
> > 
> > 30 16 * * * /home/administrator/cdto.sh > /home/administrator/cdto.log
> > 
> > And here is cdto.sh
> > 
> > $ cat cdto.sh
> > 
> > cd /cygdrive/c/users/public/music/newmusic.newmusic3
> > find . -size    +10M -type f -delete
> > find . -mtime  +30 -type f -delete
> > 
> > Sincerely,
> > 
> > James B. Diskin
> > 
> > http://jbdst8.googlepages.com/home
> > 

[SNIP]: Few hundred bytes of mailing list topics (digest).

-- 
Tom Rhodes


More information about the wplug mailing list