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 8929607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:42:38+00:00 2026-06-15T08:42:38+00:00

I tried Quartz.com documentation & googled for couple for hours…but could not find single

  • 0

I tried Quartz.com documentation & googled for couple for hours…but could not find single good article on how to get Next Job (which is supposr to fire in future).

I am using CronTrigger Expression to Schedule jobs, using VB.net (winforms). jobs works fine…however I would like my users to see when will it FIRE next. I am storing CronExpression in my database, Can I use that Expression to show next Fire Date/Time to my end users? or if there is any other way possible please advise (with a simple samply).

Thanks

Edit

Following Code Returns next job will fire after 12 minutes instead of 20 minute

    Dim exp As CronExpression = New CronExpression("0 0/20 * * * ?")
    Dim nextFire As String = exp.GetNextValidTimeAfter(DateTime.Now)
    MsgBox(nextFire)
  • 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-06-15T08:42:39+00:00Added an answer on June 15, 2026 at 8:42 am

    You can create a new JobKey

    JobKey jobKey = new JobKey(jobName, groupName);
    

    and use the key to fetch the job detail:

    var detail = scheduler.GetJobDetail(jobKey);
    

    this is a simple function which does what you’re looking for:

        private DateTime getNextFireTimeForJob(IScheduler scheduler, string jobName, string groupName = "")
        {
            JobKey jobKey = new JobKey(jobName, groupName);
            DateTime nextFireTime = DateTime.MinValue;
    
            bool isJobExisting = Scheduler.CheckExists(jobKey);
            if (isJobExisting)
            {
                var detail = scheduler.GetJobDetail(jobKey);
                var triggers = scheduler.GetTriggersOfJob(jobKey);
    
                if (triggers.Count > 0)
                {
                    var nextFireTimeUtc = triggers[0].GetNextFireTimeUtc();
                    nextFireTime = TimeZone.CurrentTimeZone.ToLocalTime(nextFireTimeUtc.Value.DateTime);
                }
            }
    
            return (nextFireTime);
        }
    

    It works only if you have one trigger per job.
    If there’s more than one trigger in your job you can loop through them:

    foreach (ITrigger trigger in triggers)
    {
        Console.WriteLine(jobKey.Name);
        Console.WriteLine(detail.Description);
        Console.WriteLine(trigger.Key.Name);
        Console.WriteLine(trigger.Key.Group);
        Console.WriteLine(trigger.GetType().Name);
        Console.WriteLine(scheduler.GetTriggerState(trigger.Key));
        DateTimeOffset? nextFireTime = trigger.GetNextFireTimeUtc();
        if (nextFireTime.HasValue)
        {
            Console.WriteLine(TimeZone.CurrentTimeZone.ToLocalTime(nextFireTime.Value.DateTime).ToString());
        }
    }
    

    or using Linq (System.Linq) :

     var myTrigger = triggers.Where(f => f.Key.Name == "[trigger name]").SingleOrDefault();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Tried searching the site, but cannot find an answer to my problem: Lets say
Tried this: $('.link').click(function(e) { $.getScript('http://www.google.com/uds/api?file=uds.js&amp;v=1.0', function() { $('body').append('<p>GOOGLE API (UDS) is loaded</p>'); }); return
tried to find the answer by googling and in MSDN but with no luck.
So I tried to use the Quartz CGImageCreateWithMaskingColors function, but he only problem is
tried uncommenting pam_limits.so from the pam.d directory but no luck. Basic PAM seems to
Tried a bunch of things but I can't get it to work consistently amid
Tried examples from 'php.net' but don't understand what's the problem. Any suggestions? <?php $_SESSION['test']
I am trying to get Quartz.net scheduler to work, but I don't know why
I have a quartz job that needs to render a GSP, when I tried:
I have subclassed UIImageView and tried to override drawRect so I could draw on

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.