views:

61

answers:

1

Hi,

I have 2 instances which implements 2 different instance IDs in 2 different windows services as:

//windows service 1 instance 1 properties["quartz.scheduler.instanceName"] = "instanceName1"; properties["quartz.scheduler.instanceId"] = "instanceID1";

//windows service 2 instance 2 properties["quartz.scheduler.instanceName"] = "instanceName2"; properties["quartz.scheduler.instanceId"] = "instanceID2";

In the ADOJobstore, I can see that there are two instances.

However, when I schedule a simple job in instance1, it is getting triggered in instance2 (and vise versa). By looking at the records created in jobstore, the scheduled job are properly tagged with the expected instanceIDs. Any idea of why this is happening?

+1  A: 

This is the expected behavior. If you have 2 instances pointing to the same store, either instance can pull jobs from it. Basically you are running a cluster of schedulers and AFAIK there is no way to limit jobs to running on one particular server. You will have to set up 2 different job stores if you want jobs to run on one particular server.

TskTsk