Hi again,
Wito wrote:
When I don't set evironment then I get message: "db2 not found". When I set
environment then I get message from the topic. I set it from script, before
executing db2 command. I paste to script all of variables (printenv). Maybe
setting ev. in cron will help? But how can I set it from cron profile?
You should find the answer in your cron-daemons documentation. I donīt
know AIX. Most Linux Systems use vixie cron.
Try
man 5 crontab
---snip---
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 subsequent 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
overridden by settings in the crontab; LOGNAME may not.
---snap----
As I said, this one is from the vixie-cron manual page. You would need
to consult your systems documentation to find out how to set environment
variables on your AIX-System or ask your system administrator.
regards,
Norbert