envvars: NAME=value, one line per variable (repeat the attribute).
profile: /path/file.env runs a file of exports first.
Quote values with spaces: envvars: LABEL="month end".
Quote or escape colons: envvars: DB_URL="db01:1521/FIN".
In scripts, fail on missing values: ${VAR:?VAR not set}.
✦ Definition~90s read
What is AutoSys envvars and profile?
An AutoSys job starts without your interactive shell setup, so variables exported in ~/.bashrc aren't there. The envvars attribute sets environment variables for the job, one variable per line; the profile attribute names a file of exports that runs before the command.
★
Your terminal is a desk with sticky notes everywhere.
Plain-English First
Your terminal is a desk with sticky notes everywhere. The job gets a clean desk. envvars hands it the notes it needs, one at a time; profile hands it the whole notebook.
A script that reads $BUS_DATE works in your terminal and writes to the wrong folder in AutoSys, because the job never had the variable. This guide shows how to give it one.
Why the Job Doesn't See It
The job runs a command through the agent, not your login shell, so files like ~/.bashrc aren't read.
debug.shBASH
1
2
# temporary: see the job's environment
env | sort > /tmp/job_env.txt
🎯 Key Takeaway
Pass everything the script needs.
envvars
One envvars line per variable. Use as many as you need.