* Meike Stone email@example.com [11-22-12 12:26]:
I've a question related to cron on SuSE.
I like to set global environment variables for all cron jobs. I see, that per default the cron runs a /bin/sh (link to /bin/bash). But in this mode of bash, the profile file will not included.
So my questions are:
- Is there a possibility to set global environment variables with
using /bin/sh? 2) Or if not, how do I configure the /bin/bash as default for all crontabs?
I know, that I can set environment variables in the crontabs (cron.d, cron.daily, ...) itself, but that is not the requested solution. I tried to set the SHELL=/bin/bash in the /etc/crontab, but that is not working!
set SHELL='/bin/sh -e script' set the env you wish in the script and continue in that env.
note: I have not a need for this and have not tried, but it *should* work.(tm!)