Hi all,
I am new to Quartznet schedulers. I am trying to implement
"CalendarIntervalTriggerImpl" trigger. I set a passed date (a day in
2010 year) to the trigger.
When I call the ScheduleJob method by passing the Jobdetail
& Triggers, it immediately triggers the Job.Execute method. Whether I
am missing anything. Please guide me in correct way.
On Sat, Mar 24, 2012 at 12:00 PM, tamil <tamilmani....@gmail.com> wrote: > Hi all, > I am new to Quartznet schedulers. I am trying to implement > "CalendarIntervalTriggerImpl" trigger. I set a passed date (a day in > 2010 year) to the trigger.
> When I call the ScheduleJob method by passing the Jobdetail > & Triggers, it immediately triggers the Job.Execute method. Whether I > am missing anything. Please guide me in correct way.
> Thanks, > Tamil
> -- > You received this message because you are subscribed to the Google Groups "Quartz.NET" group. > To post to this group, send email to quartznet@googlegroups.com. > To unsubscribe from this group, send email to quartznet+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/quartznet?hl=en.
On Mon, Mar 26, 2012 at 3:52 AM, Nuno Maia <nmsm...@gmail.com> wrote: > Hi,
> Can you paste the code that are you using to schedule the job ?
> On Sat, Mar 24, 2012 at 12:00 PM, tamil <tamilmani....@gmail.com> wrote: > > Hi all, > > I am new to Quartznet schedulers. I am trying to implement > > "CalendarIntervalTriggerImpl" trigger. I set a passed date (a day in > > 2010 year) to the trigger.
> > When I call the ScheduleJob method by passing the Jobdetail > > & Triggers, it immediately triggers the Job.Execute method. Whether I > > am missing anything. Please guide me in correct way.
> > Thanks, > > Tamil
> > -- > > You received this message because you are subscribed to the Google > Groups "Quartz.NET" group. > > To post to this group, send email to quartznet@googlegroups.com. > > To unsubscribe from this group, send email to > quartznet+unsubscribe@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/quartznet?hl=en.
> -- > You received this message because you are subscribed to the Google Groups > "Quartz.NET" group. > To post to this group, send email to quartznet@googlegroups.com. > To unsubscribe from this group, send email to > quartznet+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/quartznet?hl=en.
I can see if the refire policy is set to "Skip" where this might not make a difference...sorry if this is a dumb question...I use these emails as a chance to learn as well...
> public static void AddJob() > { > IJob myJob = new MyJob(); //This Constructor needs to be > parameterless > JobDetailImpl jobDetail = new JobDetailImpl("Group1", "Group1", > myJob.GetType()); > CalendarIntervalTriggerImpl trigger = new > CalendarIntervalTriggerImpl("Group1", "Group1", IntervalUnit.Week, 2); > trigger.StartTimeUtc = DateTime.Now.AddDays(-3).AddSeconds(15); > _scheduler.ScheduleJob(jobDetail, trigger); > Console.WriteLine("Next : {0}", > trigger.GetNextFireTimeUtc().Value.ToLocalTime()); > } > }
> internal class MyJob : IJob > { > public void Execute(IJobExecutionContext context) > { > Console.WriteLine("Executing the job..."); > } > }
> when the line " _scheduler.ScheduleJob(jobDetail, trigger);" hits, it > immediately executes the "Job.Execute" method. Please guide me. > On Mon, Mar 26, 2012 at 3:52 AM, Nuno Maia <nmsm...@gmail.com> wrote:
> > Hi,
> > Can you paste the code that are you using to schedule the job ?
> > On Sat, Mar 24, 2012 at 12:00 PM, tamil <tamilmani....@gmail.com> wrote: > > > Hi all, > > > I am new to Quartznet schedulers. I am trying to implement > > > "CalendarIntervalTriggerImpl" trigger. I set a passed date (a day in > > > 2010 year) to the trigger.
> > > When I call the ScheduleJob method by passing the Jobdetail > > > & Triggers, it immediately triggers the Job.Execute method. Whether I > > > am missing anything. Please guide me in correct way.
> > > Thanks, > > > Tamil
> > > -- > > > You received this message because you are subscribed to the Google > > Groups "Quartz.NET" group. > > > To post to this group, send email to quartznet@googlegroups.com. > > > To unsubscribe from this group, send email to > > quartznet+unsubscribe@googlegroups.com. > > > For more options, visit this group at > > http://groups.google.com/group/quartznet?hl=en.
> > -- > > You received this message because you are subscribed to the Google Groups > > "Quartz.NET" group. > > To post to this group, send email to quartznet@googlegroups.com. > > To unsubscribe from this group, send email to > > quartznet+unsubscribe@googlegroups.com. > > For more options, visit this group at > > http://groups.google.com/group/quartznet?hl=en.
> -- > You received this message because you are subscribed to the Google Groups "Quartz.NET" group. > To post to this group, send email to quartznet@googlegroups.com. > To unsubscribe from this group, send email to quartznet+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/quartznet?hl=en.
> public static void AddJob() > { > IJob myJob = new MyJob(); //This Constructor needs to be > parameterless > JobDetailImpl jobDetail = new JobDetailImpl("Group1", "Group1", > myJob.GetType()); > CalendarIntervalTriggerImpl trigger = new > CalendarIntervalTriggerImpl("Group1", "Group1", IntervalUnit.Week, 2); > trigger.StartTimeUtc = DateTime.Now.AddDays(-3).AddSeconds(15); > _scheduler.ScheduleJob(jobDetail, trigger); > Console.WriteLine("Next : {0}", > trigger.GetNextFireTimeUtc().Value.ToLocalTime()); > } > }
> internal class MyJob : IJob > { > public void Execute(IJobExecutionContext context) > { > Console.WriteLine("Executing the job..."); > } > }
> when the line " _scheduler.ScheduleJob(jobDetail, trigger);" hits, it > immediately executes the "Job.Execute" method. Please guide me. > On Mon, Mar 26, 2012 at 3:52 AM, Nuno Maia <nmsm...@gmail.com> wrote:
>> Hi,
>> Can you paste the code that are you using to schedule the job ?
>> On Sat, Mar 24, 2012 at 12:00 PM, tamil <tamilmani....@gmail.com> wrote: >> > Hi all, >> > I am new to Quartznet schedulers. I am trying to implement >> > "CalendarIntervalTriggerImpl" trigger. I set a passed date (a day in >> > 2010 year) to the trigger.
>> > When I call the ScheduleJob method by passing the Jobdetail >> > & Triggers, it immediately triggers the Job.Execute method. Whether I >> > am missing anything. Please guide me in correct way.
>> > Thanks, >> > Tamil
>> > -- >> > You received this message because you are subscribed to the Google >> > Groups "Quartz.NET" group. >> > To post to this group, send email to quartznet@googlegroups.com. >> > To unsubscribe from this group, send email to >> > quartznet+unsubscribe@googlegroups.com. >> > For more options, visit this group at >> > http://groups.google.com/group/quartznet?hl=en.
>> -- >> You received this message because you are subscribed to the Google Groups >> "Quartz.NET" group. >> To post to this group, send email to quartznet@googlegroups.com. >> To unsubscribe from this group, send email to >> quartznet+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/quartznet?hl=en.
> -- > You received this message because you are subscribed to the Google Groups > "Quartz.NET" group. > To post to this group, send email to quartznet@googlegroups.com. > To unsubscribe from this group, send email to > quartznet+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/quartznet?hl=en.
On Tue, Mar 27, 2012 at 6:59 PM, Nuno Maia <nmsm...@gmail.com> wrote: > By defining a paste date you are forcing a misfire. Define a proper > misfire policy to skip to next execution date.
> On Mon, Mar 26, 2012 at 6:37 AM, tamilmani araichimani > <tamilmani....@gmail.com> wrote: > > Thanks for you reply Nuno. Please have a look at the following code,
> > class Program > > { > > private static IScheduler _scheduler;
> > internal class MyJob : IJob > > { > > public void Execute(IJobExecutionContext context) > > { > > Console.WriteLine("Executing the job..."); > > } > > }
> > when the line " _scheduler.ScheduleJob(jobDetail, trigger);" hits, it > > immediately executes the "Job.Execute" method. Please guide me. > > On Mon, Mar 26, 2012 at 3:52 AM, Nuno Maia <nmsm...@gmail.com> wrote:
> >> Hi,
> >> Can you paste the code that are you using to schedule the job ?
> >> On Sat, Mar 24, 2012 at 12:00 PM, tamil <tamilmani....@gmail.com> > wrote: > >> > Hi all, > >> > I am new to Quartznet schedulers. I am trying to implement > >> > "CalendarIntervalTriggerImpl" trigger. I set a passed date (a day in > >> > 2010 year) to the trigger.
> >> > When I call the ScheduleJob method by passing the Jobdetail > >> > & Triggers, it immediately triggers the Job.Execute method. Whether I > >> > am missing anything. Please guide me in correct way.
> >> > Thanks, > >> > Tamil
> >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups "Quartz.NET" group. > >> > To post to this group, send email to quartznet@googlegroups.com. > >> > To unsubscribe from this group, send email to > >> > quartznet+unsubscribe@googlegroups.com. > >> > For more options, visit this group at > >> > http://groups.google.com/group/quartznet?hl=en.
> >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "Quartz.NET" group. > >> To post to this group, send email to quartznet@googlegroups.com. > >> To unsubscribe from this group, send email to > >> quartznet+unsubscribe@googlegroups.com. > >> For more options, visit this group at > >> http://groups.google.com/group/quartznet?hl=en.
> > -- > > You received this message because you are subscribed to the Google Groups > > "Quartz.NET" group. > > To post to this group, send email to quartznet@googlegroups.com. > > To unsubscribe from this group, send email to > > quartznet+unsubscribe@googlegroups.com. > > For more options, visit this group at > > http://groups.google.com/group/quartznet?hl=en.
> -- > You received this message because you are subscribed to the Google Groups > "Quartz.NET" group. > To post to this group, send email to quartznet@googlegroups.com. > To unsubscribe from this group, send email to > quartznet+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/quartznet?hl=en.