Hi
I'm moving from a singel node system to a cluster system.
And I have to move a lot of crontab enteries, and I wondering if anyboddy have any good ideers, on how to make them cluster aware(only run on the node where the cluster package is running)
One of the options that I was thinking about.
Was to make a script that checks if the package is running on the server and then putting this in front of all the script in the cron. But it will give me problems when these scripts are executede with special caracters.
ex. a posible cron
Could have a script that would execute the command only if the right cluster package is running on the node.
ex.
But I can't figure out how to make the ClusterAware.sh script in a way where it can handle the special caracters.
I realise that I cound build the cluster aware into every script, but that is not quite what I want.
Hope some one can help, or anyboddy that have tryede something simular.
/LHG
I'm moving from a singel node system to a cluster system.
And I have to move a lot of crontab enteries, and I wondering if anyboddy have any good ideers, on how to make them cluster aware(only run on the node where the cluster package is running)
One of the options that I was thinking about.
Was to make a script that checks if the package is running on the server and then putting this in front of all the script in the cron. But it will give me problems when these scripts are executede with special caracters.
ex. a posible cron
Code:
* * * * * /home/monitoring>> /home/log/`hostname -s`_monitoring_`date +\%Y\%m\%d`.log 2>&1
Could have a script that would execute the command only if the right cluster package is running on the node.
ex.
Code:
* * * * * /home/ClusterAware.sh /home/monitoring>> /home/log/`hostname -s`_monitoring_`date +\%Y\%m\%d`.log 2>&1
But I can't figure out how to make the ClusterAware.sh script in a way where it can handle the special caracters.
I realise that I cound build the cluster aware into every script, but that is not quite what I want.
Hope some one can help, or anyboddy that have tryede something simular.
/LHG