コード例 #1
0
ファイル: QuartzScheduler.cs プロジェクト: natenho/quartznet
        /// <summary>
        /// Create a <see cref="QuartzScheduler" /> with the given configuration
        /// properties.
        /// </summary>
        /// <seealso cref="QuartzSchedulerResources" />
        public QuartzScheduler(QuartzSchedulerResources resources, TimeSpan idleWaitTime)
        {
            log = LogManager.GetLogger(GetType());
            this.resources = resources;

            if (resources.JobStore is IJobListener)
            {
                AddInternalJobListener((IJobListener) resources.JobStore);
            }

            schedThread = new QuartzSchedulerThread(this, resources);
            IThreadExecutor schedThreadExecutor = resources.ThreadExecutor;
            schedThreadExecutor.Execute(schedThread);

            if (idleWaitTime > TimeSpan.Zero)
            {
                schedThread.IdleWaitTime = idleWaitTime;
            }

            jobMgr = new ExecutingJobsManager();
            AddInternalJobListener(jobMgr);
            errLogger = new ErrorLogger();
            AddInternalSchedulerListener(errLogger);

            signaler = new SchedulerSignalerImpl(this, schedThread);

            log.InfoFormat(CultureInfo.InvariantCulture, "Quartz Scheduler v.{0} created.", Version);
        }
コード例 #2
0
ファイル: QuartzScheduler.cs プロジェクト: jvilalta/quartznet
        /// <summary>
        /// Create a <see cref="QuartzScheduler" /> with the given configuration
        /// properties.
        /// </summary>
        /// <seealso cref="QuartzSchedulerResources" />
        public QuartzScheduler(QuartzSchedulerResources resources, TimeSpan idleWaitTime) : this()
        {
            this.resources = resources;

            if (resources.JobStore is IJobListener)
            {
                AddInternalJobListener((IJobListener) resources.JobStore);
            }

            schedThread = new QuartzSchedulerThread(this, resources);
            schedThread.Start();

            if (idleWaitTime > TimeSpan.Zero)
            {
                schedThread.IdleWaitTime = idleWaitTime;
            }

            jobMgr = new ExecutingJobsManager();
            AddInternalJobListener(jobMgr);
            var errLogger = new ErrorLogger();
            AddInternalSchedulerListener(errLogger);

            SchedulerSignaler = new SchedulerSignalerImpl(this, schedThread);

            log.InfoFormat("Quartz Scheduler v.{0} created.", Version);
        }
コード例 #3
0
ファイル: QuartzScheduler.cs プロジェクト: neumik/quartznet
        /// <summary>
        /// Create a <see cref="QuartzScheduler" /> with the given configuration
        /// properties.
        /// </summary>
        /// <seealso cref="QuartzSchedulerResources" />
        public QuartzScheduler(QuartzSchedulerResources resources, TimeSpan idleWaitTime, TimeSpan dbRetryInterval)
        {
            log = LogManager.GetLogger(GetType());
            this.resources = resources;

            if (resources.JobStore is IJobListener)
            {
                AddInternalJobListener((IJobListener) resources.JobStore);
            }

            schedThread = new QuartzSchedulerThread(this, resources);
            IThreadExecutor schedThreadExecutor = resources.ThreadExecutor;
            schedThreadExecutor.Execute(schedThread);

            if (idleWaitTime > TimeSpan.Zero)
            {
                schedThread.IdleWaitTime = idleWaitTime;
            }
            if (dbRetryInterval > TimeSpan.Zero)
            {
                schedThread.DbFailureRetryInterval = dbRetryInterval;
            }

            jobMgr = new ExecutingJobsManager();
            AddInternalJobListener(jobMgr);
            errLogger = new ErrorLogger();
            AddInternalSchedulerListener(errLogger);

            signaler = new SchedulerSignalerImpl(this, schedThread);

            log.InfoFormat(CultureInfo.InvariantCulture, "Quartz Scheduler v.{0} created.", Version);

            log.Info("Scheduler meta-data: " +
                     (new SchedulerMetaData(SchedulerName,
                                            SchedulerInstanceId, GetType(), boundRemotely, RunningSince != null,
                                            InStandbyMode, IsShutdown, RunningSince,
                                            NumJobsExecuted, JobStoreClass,
                                            SupportsPersistence, Clustered, ThreadPoolClass,
                                            ThreadPoolSize, Version)));
        }
コード例 #4
0
ファイル: QuartzScheduler.cs プロジェクト: jondhinkle/Rock
        /// <summary>
        /// Create a <see cref="QuartzScheduler" /> with the given configuration
        /// properties.
        /// </summary>
        /// <seealso cref="QuartzSchedulerResources" />
        public QuartzScheduler(QuartzSchedulerResources resources, TimeSpan idleWaitTime, TimeSpan dbRetryInterval)
        {
            this.resources = resources;

            if (resources.JobStore is IJobListener)
            {
                AddInternalJobListener((IJobListener) resources.JobStore);
            }

            schedThread = new QuartzSchedulerThread(this, resources);
            IThreadExecutor schedThreadExecutor = resources.ThreadExecutor;
            schedThreadExecutor.Execute(schedThread);

            if (idleWaitTime > TimeSpan.Zero)
            {
                schedThread.IdleWaitTime = idleWaitTime;
            }
            if (dbRetryInterval > TimeSpan.Zero)
            {
                schedThread.DbFailureRetryInterval = dbRetryInterval;
            }

            jobMgr = new ExecutingJobsManager();
            AddInternalJobListener(jobMgr);
            errLogger = new ErrorLogger();
            AddInternalSchedulerListener(errLogger);

            signaler = new SchedulerSignalerImpl(this, schedThread);
        }