I have a process that runs on a @reboot cron job. The process needs to run an executable file. I have noticed that I have to put the executable in /usr/bin/. I can't just put it in a folder in my $PATH list.

So my question is, if processes run by cron jobs do not look in the $PATH list of directories, where do they look? Obviously they at least look in /usr/bin/.

  • 5
    Does this answer your question? Where is cron's PATH set? – ajgringo619 Jan 10 at 2:18
  • You could create a job with echo "$PATH" >/tmp/cronpath and get a definitive answer for your environment.. – roaima Jan 18 at 11:33

Does this one answer your question sufficiently?: Where is cron's PATH set? (as per comment)

Check also the comment on the accepted answer. Have you tried scheduling a script that prints it's environment variables using a command like env? That should get you the answer on your own system, as things can change over time and, of course, we can sometimes (unknowingly) change standard settings when doing something else.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.