Shared cron jobs

Neil prockter at lse.ac.uk
Fri May 12 23:14:00 BST 2006


I've not been in your situation but that method is a bit too tightly
integrated in for my liking. if you are using some form of package
management you may need to keep applying it

you have a virtual ip which only one of the hosts has at a time. I'd use
that

have the cron job on both but making it check if its host has that ip
address and exit if it doesn't.

Neil
Dan Brown wrote:
> My pair of LVS servers share the same database.  I have a couple of sites
> which import data daily from other sites, or via uploaded files.  I do not
> want the servers to both be running the same job at the same time obviously
> so I'd like to swap out crontab files when the backup director takes over.
> 
> As it happens this should be relatively easy since it's a two server setup
> using Ultramonkey with both the httpd services and the ldirector processes
> on the same server.  I don't have to deal with X number of extra possible
> servers.  
> However I'm not entirely sure where a _good_ place to put it would be.  It
> seems that putting it in the /etc/init.d/ldirector script might work,
> something like:
> 
> case "$1" in
>   start)
>         action "Starting ldirectord" $DAEMON start
>         if [ $? -eq 0 ]; then
>           cp -f /etc/crontab.ldirector-running /etc/crontab
>         fi
>         ;;
>   stop)
>         action "Stopping ldirectord" $DAEMON stop
>         if [ $? -eq 0 ]; then
>           cp -f /etc/crontab.ldirector-stopped /etc/crontab
>         fi
>         ;;
>   ...
> esac
> 
> 
> What do you suggest?
> 
> _________________________________
> Dan Brown
> zu.com communications inc.       
> 
> 
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users at LinuxVirtualServer.org
> Send requests to lvs-users-request at LinuxVirtualServer.org
> or go to http://www.in-addr.de/mailman/listinfo/lvs-users



Search lvs-users Archives
Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort

More information about the lvs-users mailing list