0

I'm using quartz .net server embedded in my asp.net application but is always turning into standby mode. Even with a scheduled cron job in NORMAL mode.

Those are my scheduler properties:

var properties = new NameValueCollection();

        properties["quartz.dataSource.DataSource.connectionString"] = "data source=connectionstring";
        properties["quartz.dataSource.DataSource.provider"] = "SqlServer-20";

        properties["quartz.scheduler.instanceName"] = "MyScheduler";

        properties["quartz.threadPool.type"] = "Quartz.Simpl.SimpleThreadPool, Quartz";
        properties["quartz.threadPool.threadCount"] = "5";
        properties["quartz.threadPool.threadPriority"] = "Normal";

        properties["quartz.jobStore.type"] = "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz";
        properties["quartz.jobStore.driverDelegateType"] = "Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz ";
        properties["quartz.jobStore.tablePrefix"] = "QRTZ_";
        properties["quartz.jobStore.dataSource"] = "DataSource";
        properties["quartz.jobStore.useProperties"] = "true";

        return new StdSchedulerFactory(properties);

How to make it always running? Do I need to run it as a windows service?

4

1 回答 1

0

Running the Quartz.net scheduler as a windows service seems to be best method.

The default for IIS is to shutdown any ASP.net applications if there are no users connected to them, which means your scheduler is no longer running. It is possible to change these defaults (see Can you prevent your ASP.NET application from shutting down?), but a better way is to write your scheduler as a windows service.

于 2013-10-12T10:25:38.343 回答