Re: [Hampshire] Cron script problem

Top Page

Reply to this message
Author: Vic
Date:  
To: hampshire
Subject: Re: [Hampshire] Cron script problem

> After adding the folder that holds the "file" to
> $PATH and then changing crontab to run from /folder/file.sh it would not
> run But when I changed it to /folder/file it ran?


Yes - exactly,

The name of your script was "day1", IIRC. That's its name - calling it
day1.sh doesn't work, because that's the name of a completely different
file (that doesn't exist).

You *also* need to tell the OS where to find your script - either by
giving it an explicit pathname, or letting it find it by searching along
$PATH - but that's entirely secondary to the problem of needing to use the
right name in the first place.

> I understood the part about the file did not exist, my problem was finding
> out why it thought it did not exist


Simply because it didn't exist. Your script was called "day1". "day1.sh"
is not the same file.

Vic.