SaaS CMS has officially launched! Learn more now.

Running scheduled jobs on only one of two load-balanced servers


We have two load-balanced servers.  We want scheduled jobs to run on one of them only.

I know you can change the episerver.config file and set "enabledScheduler" to false, but this screws up our build process.  Right now, we deploy the exact same code to both machines, and we want to keep it like that.

If we disable the EPiServer Scheduler Service on one of the machines, this could do one of two things.

  1. Stop running scheduled jobs on this machine.
  2. "Strand" jobs on this machine -- queue them up, but never run them.

Obviously, #1 is what we're looking for.  But we haven't tried it because we fear #2.

So, what will happen if we disable this server on one of the machines.  Will we get the result we want?


Nov 03, 2010 16:06

I've not looked in detail but from my understanding option #2 would be fine. If my understanding is correct then the following happens on the machine:

  • The scheduler fires up
  • Looks in the database for a job that needs executing
  • Executes the job
  • Looks for the next job etc

So if you go with option #2 then the scheduler should just do its thing on one box only. As far as I am aware jobs are scheduled at a database level and never for a particular machine.

Nov 03, 2010 16:17

Ps if you want to dig into things further then you can find scheduled jobs information in the [tblScheduledItem] table

Nov 03, 2010 16:18

I was under the impression that disabling the Windows service EPiServer Scheduler Service on one of the servers would do the trick (#1). Haven't dug in deep though but haven't noticed any contradiction in three environments using this method.

Edit: Added that I was referring to #1

Edited, Nov 03, 2010 16:37
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.