sslug-teknik team mailing list archive
-
sslug-teknik team
-
Mailing list archive
-
Message #65468
Re: Env variable i cronjobs
On Sun, 20 Jul 2003 20:40:32 +0200
Steen Jarbøel <steen@xxxxxxxxxx> wrote:
>
> Det nytter ikke at rette brugerens .bash-profile
Som Frank Damgaard siger, så må du skrive din env i jobbene.
Du kan godt smage på user-id i scripts ved fx. UID=$(id -u)
man 5 crontab:
An active line in a crontab will be either an environment setting or a
cron command. An environment setting is of the form,
name = value
where the spaces around the equal-sign (=) are optional, and any subse-
quent non-leading spaces in value will be part of the value assigned to
name. The value string may be placed in quotes (single or double, but
matching) to preserve leading or trailing blanks.
Several environment variables are set up automatically by the cron(8)
daemon. SHELL is set to /bin/sh, and LOGNAME and HOME are set from the
/etc/passwd line of the crontab's owner. HOME and SHELL may be over-
ridden by settings in the crontab; LOGNAME may not.
--
donald_j_axel@xxxxxxxxxx -- Linux works for me. http://d-axel.dk/
References