Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: ejonesWhen the cron daemon runs the shell script, it runs as the user but doesn't run any of the login shell scripts that set up the environment. So the first thing your shell script needs to run, actually "source", the login shell scripts that set up the LAE environment.
You have to "source" the login shell scripts because, normally when you execute a Unix/Linux command it starts a separate process, executes the command and then exits that process. This way every environment variable or whatever created by that command goes away when that process exits and doesn't stay around to cause havoc with the next thing you do. So to make a shell script execute without losing all the environment variables you use the command "source" in front of the name of the shell script. The "source" statement is often shortened to just a period "." which means the same thing.
When you log into a Unix environment using PuTTY there are shell scripts that are "source"ed automatically for you. One in particular can be found in the login directory named .bash_profile. That file probably contains the commands to "source" the .profile.lavastorm shell script that is in the LAE install directory.
At minimum, the first thing the shell script should do is source either that .bash_profile or the .profile.lavastorm and it might look like this:
LAE_HOME=/opt/lavastorm/lae/4.6.1/
source $LAE_HOME/.profile.lavastorm
As far as how to make the graph run at particular times, you do that information in the crontab file. I often refer to the Wikipedia article on configuring the crontab here,
http://en.wikipedia.org/wiki/Crontab and even cut and paste the following table into the crontab itself for future reference. Every line begins with a "#" character which makes it a comment.
# * * * * * command to execute
# ┬ ┬ ┬ ┬ ┬
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ └───── day of week (0 - 7) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
# │ │ │ └────────── month (1 - 12)
# │ │ └─────────────── day of month (1 - 31)
# │ └──────────────────── hour (0 - 23)
# └───────────────────────── min (0 - 59)