On Mon, May 21, 2007 at 03:58:29PM -0400, Knight, Doug wrote:
> Is it possible to configure heartbeat to trigger a job that would
> normally be triggered as a cronjob? For instance, I have a database
> maintenance script that only runs once a night during a non-peak period.
> It assumes that it is running on a server where the database is
> available. What I'd like to be able to do is configure heartbeat to
> trigger this job once a day, just like crontab is currently doing, but
> ONLY on the server where the database is currently running and managed
> by heartbeat. I plan on modifying the crontab script to become an
> LSB/OCF type script accessible by heartbeat.
Put something like
crm_resource -W -r your_db_resource | grep -qs `uname -n` ||
exit
at the top of your script. Please check the output of crm_resource
beforehand to set this right.
>
> Doug Knight
> WSI, Inc.
> Andover, MA
> _______________________________________________________
> Linux-HA-Dev: [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
--
Dejan
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/