protected override IScheduler CreateScheduler(string name, int threadPoolSize) { DBConnectionManager.Instance.AddConnectionProvider("default", new DbProvider("SqlServer-20", "Server=(local);Database=quartz;Trusted_Connection=True;")); var jobStore = new JobStoreTX { DataSource = "default", TablePrefix = "QRTZ_", InstanceId = "AUTO", DriverDelegateType = typeof(SqlServerDelegate).AssemblyQualifiedName }; DirectSchedulerFactory.Instance.CreateScheduler(name + "Scheduler", "AUTO", new SimpleThreadPool(threadPoolSize, ThreadPriority.Normal), jobStore); return SchedulerRepository.Instance.Lookup(name + "Scheduler"); }
protected override Task<IScheduler> CreateScheduler(string name, int threadPoolSize) { DBConnectionManager.Instance.AddConnectionProvider("default", new DbProvider(TestConstants.DefaultSqlServerProvider, TestConstants.DefaultSqlServerConnectionString)); var jobStore = new JobStoreTX { DataSource = "default", TablePrefix = "QRTZ_", InstanceId = "AUTO", DriverDelegateType = typeof(SqlServerDelegate).AssemblyQualifiedName, ObjectSerializer = serializer }; DirectSchedulerFactory.Instance.CreateScheduler(name + "Scheduler", "AUTO", new DefaultThreadPool(), jobStore); return SchedulerRepository.Instance.Lookup(name + "Scheduler"); }
private Task<IScheduler> CreateScheduler(string name, int threadPoolSize) { DBConnectionManager.Instance.AddConnectionProvider("default", new DbProvider("SqlServer-20", "Server=(local);Database=quartz;Trusted_Connection=True;")); var serializer = new JsonObjectSerializer(); serializer.Initialize(); var jobStore = new JobStoreTX { DataSource = "default", TablePrefix = "QRTZ_", InstanceId = "AUTO", DriverDelegateType = typeof(SqlServerDelegate).AssemblyQualifiedName, ObjectSerializer = serializer }; DirectSchedulerFactory.Instance.CreateScheduler(name + "Scheduler", "AUTO", new DefaultThreadPool(), jobStore); return SchedulerRepository.Instance.Lookup(name + "Scheduler"); }