Meike Stone wrote:
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.
That is independent of usage of /bin/sh vs. /bin/bash. profile is never sourced in cron jobs since they are not interactive. Read http://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html for more information. You might try ENV=/usr/local/etc/cron-profile in your crontab, where /usr/local/etc/cron-profile is a file that sources both /etc/profile and $HOME/.profile (or the respective bash_profiles, whatever is your goal, but then you have to set SHELL and BASH_ENV -- see the link above for the gory details). Please note that ENV=/etc/profile does not establish the same environment like login does, therefore I propose to establish a shell source script to achieve that. Joachim PS: And here's hoping that your profile doesn't do something tty related or other inherently interactive stuff. Very often, sourcing profile in cron jobs is actually a bad idea. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jschrod@acm.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org