Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Job.Execute triggers while scheduling the job with passed StartTimeUTC
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
tamil  
View profile  
 More options Mar 24 2012, 8:00 am
From: tamil <tamilmani....@gmail.com>
Date: Sat, 24 Mar 2012 05:00:03 -0700 (PDT)
Local: Sat, Mar 24 2012 8:00 am
Subject: Job.Execute triggers while scheduling the job with passed StartTimeUTC
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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nuno Maia  
View profile  
 More options Mar 25 2012, 6:22 pm
From: Nuno Maia <nmsm...@gmail.com>
Date: Sun, 25 Mar 2012 23:22:23 +0100
Local: Sun, Mar 25 2012 6:22 pm
Subject: Re: [quartznet:2968] Job.Execute triggers while scheduling the job with passed StartTimeUTC
Hi,

Can you paste the code that are you using to schedule the job ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tamilmani araichimani  
View profile  
 More options Mar 26 2012, 1:37 am
From: tamilmani araichimani <tamilmani....@gmail.com>
Date: Mon, 26 Mar 2012 11:07:15 +0530
Local: Mon, Mar 26 2012 1:37 am
Subject: Re: [quartznet:2969] Job.Execute triggers while scheduling the job with passed StartTimeUTC

Thanks for you reply Nuno. Please have a look at the following code,

    class Program
    {
        private static IScheduler _scheduler;

        static void Main(string[] args)
        {
            Console.WriteLine(DateTime.Now.Day);
            ISchedulerFactory schedulerFactory = new StdSchedulerFactory();
            _scheduler = schedulerFactory.GetScheduler();
            _scheduler.Start();
            AddJob();
        }

        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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Gillen  
View profile  
 More options Mar 26 2012, 7:22 am
From: Mark Gillen <markg.gil...@comcast.net>
Date: Mon, 26 Mar 2012 11:22:48 +0000 (UTC)
Local: Mon, Mar 26 2012 7:22 am
Subject: Re: [quartznet:2970] Job.Execute triggers while scheduling the job with passed StartTimeUTC
Hi Tamilani,

Sorry if I'm coming to the thread a bit late but whey are you setting the start date to be in the past by 3+ days?

 trigger.StartTimeUtc = DateTime.Now.AddDays(-3).AddSeconds(15);

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...

Best Regards,
Mark Gillen

----- tamilmani araichimani <tamilmani....@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nuno Maia  
View profile  
 More options Mar 27 2012, 9:29 am
From: Nuno Maia <nmsm...@gmail.com>
Date: Tue, 27 Mar 2012 14:29:22 +0100
Local: Tues, Mar 27 2012 9:29 am
Subject: Re: [quartznet:2970] Job.Execute triggers while scheduling the job with passed StartTimeUTC
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tamilmani araichimani  
View profile  
 More options Mar 28 2012, 3:36 am
From: tamilmani araichimani <tamilmani....@gmail.com>
Date: Wed, 28 Mar 2012 13:06:52 +0530
Local: Wed, Mar 28 2012 3:36 am
Subject: Re: [quartznet:2973] Job.Execute triggers while scheduling the job with passed StartTimeUTC

Thanks Nuno, I will try define a misfire policy and let you know the result.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »