Originally Posted by arashi256
I'm having some problems getting crond to restart my application server. This application server relies on two environment variables exported from /etc/profile. Does crond have access to these environment variables or do I have to define them in the crontab?
I usually declare any needed variables in a script and then use that script in a cron.
I believe you can do something like
00 4 * * * /path/to/your/start_application/binary
* * * * * export env_var1=x ; export env_var2=y ; sleep 5s && echo "yo"
and yet, this too may work
0 5 * * * ./etc/profile ; /path/to/command/to/run
Others may contribute something I missed (early, no coffee, too much coffee).
Please let us know.