views:

39

answers:

0

Hi all, I'm currently developing a Windows service that utilises Quartz.NET to perform jobs. To actually input and edit jobs, an ASP.NET page is used on a seperate server (currently, they're just 2 projects in the same solution but they will be on a seperate server in the future).

So far I am being lazy and declaring the scheduler in both the ASP.NET Global.asax and my Windows Service, but I don't know how well that will work int he future - plus I want to be able to detect if the scheduler is started in my ASP.NET page, which seems very hard.

Also, my Quartz.NET configuration uses ADO.NET for its job storage rather than RAM Store if that's any help. Here's an example of my scheduler code, which I am reusing in both my ASP.NET page and my Windows Service. How do I remotely access the scheduler in ASP.NET, and create the scheduler object so I can manipulate it?

Thanks

properties["quartz.scheduler.instanceName"] = "schedService";
            properties["quartz.scheduler.instanceId"] = "sched1";
            properties["quartz.threadPool.type"] = "Quartz.Simpl.SimpleThreadPool, Quartz";
            properties["quartz.threadPool.threadCount"] = threadcount;
            properties["quartz.threadPool.threadPriority"] = "Normal";
            properties["quartz.jobStore.misfireThreshold"] = "60000";
            properties["quartz.jobStore.type"] = "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz";
            properties["quartz.jobStore.useProperties"] = "false";
            properties["quartz.jobStore.dataSource"] = "default";
            properties["quartz.jobStore.tablePrefix"] = "QRTZ_";
            properties["quartz.jobStore.clustered"] = "true";
            // if running MS SQL Server we need thisl
            properties["quartz.jobStore.lockHandler.type"] = "Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz";

            // config file
            properties["quartz.dataSource.default.connectionString"] = connection;
            properties["quartz.dataSource.default.provider"] = "SqlServer-20";