Cron Daemon questions
Hi,
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? Also, I've noticed that a "ps -elf | grep crond" sometimes shows several running crond processes. Does crond spawn child processes for each task it has to perform? Thanks for any information. |
Quote:
I believe you can do something like Code:
env_var1= Code:
* * * * * export env_var1=x ; export env_var2=y ; sleep 5s && echo "yo" Code:
0 5 * * * ./etc/profile ; /path/to/command/to/run http://stackoverflow.com/questions/2...ontab-will-use Others may contribute something I missed (early, no coffee, too much coffee). Please let us know. |
You should put it in a script that way you can also examine the output from the system call to restart your application server and you can then see what the problem.
The variables you need can be set via the script as well. |
All times are GMT -5. The time now is 02:14 AM. |