[Linux-cluster] Cron Jobs

Jeff Sturm jeff.sturm at eprize.com
Wed Mar 31 13:23:39 UTC 2010


> -----Original Message-----
> From: linux-cluster-bounces at redhat.com
[mailto:linux-cluster-bounces at redhat.com]
> On Behalf Of Joseph L. Casale
> Sent: Tuesday, March 30, 2010 5:29 PM
> To: 'Linux-cluster at redhat.com'
> Subject: [Linux-cluster] Cron Jobs
> 
> Anyone know how I might accomplish keeping cron jobs on the active
node?
> I realize I can create the job on all nodes such that it quietly
checks
> for status, if it's the active node, it runs but it's much easier to
> maintain my config on the moving fs as I do with httpd/MySQL etc so
> there exists only one copy.

It's probably overkill for most people, but we've implemented Quartz for
scheduled tasks so that we'd no longer have to worry about migrating
cron jobs.  Quartz is cluster-aware when coupled to a RDBMS, though it's
unrelated to the RHCS product suite.  Implement a high-availability
RDBMS with cluster tools, run Quartz on each cluster node and it "just
works".  It's also an active-active configuration so we can exercise all
cluster nodes at once.

Someone else already mentioned it, but another good idea is creating
lock files on a GFS filesystem.  We have a "semaphore" filesystem
implemented on GFS for certain processes that must be serialized.  The
high-availability scheduler doesn't completely replace it because we may
have to worry about overlapping scheduled tasks with different start
times.  Works great.

-Jeff






More information about the Linux-cluster mailing list