コード例 #1
0
        public void AddJobToSchedule(PhocalstreamJob job)
        {
            // construct job info
            IJobDetail jobDetail = new JobDetailImpl(job.GetType().ToString(), null, job.GetType());

            ICronTrigger trigger = (ICronTrigger)TriggerBuilder.Create()
                                   .WithIdentity(job.GetType().ToString() + "trigger", null)
                                   .WithCronSchedule(job.GetSchedule())
                                   .Build();

            // Tell quartz to schedule the job using the trigger
            this._sched.ScheduleJob(jobDetail, trigger);
        } //End AddJobToSchedule
コード例 #2
0
ファイル: Scheduler.cs プロジェクト: icotting/Phocalstream
        public void AddJobToSchedule(PhocalstreamJob job)
        {
            // construct job info
            IJobDetail jobDetail = new JobDetailImpl(job.GetType().ToString(), null, job.GetType());

            ICronTrigger trigger = (ICronTrigger)TriggerBuilder.Create()
                .WithIdentity(job.GetType().ToString() + "trigger", null)
                .WithCronSchedule(job.GetSchedule())
                .Build();

            // Tell quartz to schedule the job using the trigger
            this._sched.ScheduleJob(jobDetail, trigger);
        }