Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7458093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:24:17+00:00 2026-05-29T13:24:17+00:00

I am trying to get Quartz.net scheduler to work, but I don’t know why

  • 0

I am trying to get Quartz.net scheduler to work, but I don’t know why it is not firing for jobs scheduled at a future date. I have tested with a cron trigger that fires every minute and it works (job and all), so I know it isn’t a problem with my job code.

Things I have tried:

  1. Making the ISchedulerFactory a global static variable
  2. Making the IScheduler a global static variable
  3. I have added an email notification to the end of the Application_Start so I know when it is firing
  4. Every time I make changes to the scheduler code I restart the app and it fires my notification email, so I know it was restarted.

I am running this program on a shared hosting environment (not sure if that would have any effect on it). My guess (and this is only a guess) is something is being garbage collected, but I’m not sure what and why.

void Application_Start(object sender, EventArgs e) 
{
    // Code that runs on application startup
    // construct a scheduler factory
    ISchedulerFactory schedFact = new StdSchedulerFactory();

    // get a scheduler
    IScheduler sched = schedFact.GetScheduler();
    sched.Start();

    // construct job info
    JobDetail jobDetail = new JobDetail("myJob", null, typeof(Recorder));
    jobDetail.JobDataMap["domain"] = "www.mydomain.com";
    jobDetail.JobDataMap["userId"] = "2";

    // Create trigger (everything is in UTC!!!)
    CronTrigger cronTrigger = new CronTrigger("Schedule");
    cronTrigger.StartTimeUtc = TriggerUtils.GetEvenSecondDate(DateTime.UtcNow);
    cronTrigger.TimeZone = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");  // run in pacific timezone
    cronTrigger.CronExpressionString = "0 30 13 ? * MON-FRI *"; 

    sched.ScheduleJob(jobDetail, cronTrigger);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T13:24:18+00:00Added an answer on May 29, 2026 at 1:24 pm

    ASP.NET process can be shut down by IIS if no requests are coming in, so none of this code would be fired.

    This is the reason why web-apps are not a good source of service-like (always running) behavior.

    I’ve seen this implemented in a web-app with a page/web service which gets pinged via cURL tool from the outside.

    If you’re interested in debugging this further, add some notification in Application_End just to make sure that the process is actually shut down before the timer fires your scheduled job.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build a simple scheduler using Quartz.NET, but when I try to
I am trying to build a repeating daily schedule in Quartz.Net but having a
I am trying to build a Trigger in Quartz Scheduler API which should get
I'm trying get only the Saturdays and Sundays between two dates, but I don't
I am trying to get a simple example of the Quartz scheduler working in
I am trying get the data from my database but i am not getting
I'm trying to get Quartz.net working by embedding into my .Net MVC2 application. I
I'm trying to get current Executing Job with the method scheduler.getCurrentlyExecutingJobs(); but I really
I am trying get Struts 2 and Tiles to work and I am using
Trying to get this expression to work, can someone look at it and tell

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.