Asked • 04/18/19

Where can I set environment variables that crontab will use?

I have a crontab running every hour. The user running it has environment variabless in the `.bash_profile` that work when the user runs the job from the terminal, however, obviously these don't get picked up by crontab when it runs. I've tried setting them in `.profile` and `.bashrc` but they still don't seem to get picked up. Does anyone know where I can put environment vars that crontab can pick up?

1 Expert Answer


Michael V. answered • 06/24/19

New to Wyzant

Experienced Tutor Skilled in Web Engineering and Related Subjects

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.