Xref: utzoo comp.unix.questions:9853 comp.unix.wizards:11857 Newsgroups: comp.unix.questions,comp.unix.wizards Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Why does a shell script fail in crontab? Message-ID: <1988Oct23.010903.21369@utzoo.uucp> Organization: U of Toronto Zoology References: <287@lakart.UUCP> Date: Sun, 23 Oct 88 01:09:03 GMT The three things to look for when a program runs fine manually but won't run from cron are: 1. Does it rely on any environment variables being set? For example, we had some (binary-only, grr) typesetting software that refused to run if the HOME variable wasn't set. Don't ask me why. 2. Does it rely on a non-standard (not /bin:/usr/bin) PATH? Shell scripts in particular should *ALWAYS ALWAYS ALWAYS* set PATH first thing, if only to guarantee that they aren't getting the user's funny private versions of commands. Don't forget to export the new PATH. 3. Does it rely on umask being non-zero? -- The meek can have the Earth; | Henry Spencer at U of Toronto Zoology the rest of us have other plans.|uunet!attcan!utzoo!henry henry@zoo.toronto.edu