No CD via Crontab? - TechRepublic
General discussion
June 27, 2002 at 12:26 AM
andromeda

No CD via Crontab?

by andromeda . Updated 23 years, 8 months ago

I am using crontab to start a script which will perform an automated task daily. In this (Bourne) script there are several cd commands which will change the directory. When the script is manually started from within a shell, it runs perfectly. However, when the script is started from crontab, all the cd commands are ignored and the system stays in the ‘home’ directory. So, I have to give a ‘full path’ for all the files which are called. What could be the reason?
The environmental variable CDPATH is undefined, but this is also the case in the shell from where I start the script…

This discussion is locked

All Comments