none
How to schedule my Quartz which run after every 10 minute RRS feed

  • Question

  • please tell me how could i customize my schedular which will fire after every 10 minute every day except saturday and Sunday?

    public partial class QuartzTest : Form , IJob
        {
            IScheduler sched = null;
    
            public QuartzTest()
            {
                InitializeComponent();
            }
    
            public void Execute(IJobExecutionContext context)
            {
                MessageBox.Show("job start");
            }
    
            private void QuartzTest_Load(object sender, EventArgs e)
            {
                // construct a scheduler factory
                ISchedulerFactory schedFact = new StdSchedulerFactory();
    
                // get a scheduler
                sched = schedFact.GetScheduler();
                sched.Start();
    
                IJobDetail job = JobBuilder.Create<QuartzTest>()
                    .WithIdentity("myJob", "group1")
                    .Build();
    
                ITrigger trigger = TriggerBuilder.Create()
                   .WithDailyTimeIntervalSchedule
                     (s =>
                        s.WithIntervalInHours(24)
                       .OnEveryDay()
                       .StartingDailyAt(TimeOfDay.HourAndMinuteOfDay(19, 07))
                     )
                   .Build();
    
                sched.ScheduleJob(job, trigger);
            }
    
            private void QuartzTest_FormClosing(object sender, FormClosingEventArgs e)
            {
                sched.Shutdown();
            }
        }
    
    }

    Thursday, April 11, 2019 7:52 PM

All replies