28720

Get next fire time only by looking at cron expression

I am running Quartz.NET as a service and I add my jobs directly in the quartz-jobs.xml file. So in order to add and delete jobs and triggers I deal with Xml and not the normal functions. I would like to know how can we get the next fire time of a trigger just by looking at its cron expression?

Answer1:

You can get the next fire time from given cron expression:

var expression = new CronExpression("0 26 13 17 10 ? 2015"); DateTimeOffset? time = expression.GetTimeAfter(DateTimeOffset.UtcNow);

Recommend

  • Invalid memory access of location with Rococoa
  • Asynchronous Tasks in Java Web app
  • Annotate images using tools built into OS X
  • How does quartz track the time
  • Does this cron expression mean every other Sunday?
  • Hue effect for Image - iOS
  • Quartz.net: Scheduled code not working after deployment automatically, working locally
  • c# recurring event (like for a calendar)
  • Table field that holds row count from another table
  • iOS 9 custom transition - animationControllerForDismissedController not called
  • jQuery Mobile - Dialogs without changing hash
  • Many to Many in Linq using Dapper
  • Is there any way to call saveCurrentTurnWithMatchData without sending a push notification?
  • How can I prevent the need to copy strings passed to a avr-gcc C++ constructor?
  • Combining two different ActiveRecord collections into one
  • How to run “Deployd” on port 80 instead of port 5000 in webserver.
  • Play WS (2.2.1): post/put large request
  • Breeze - Deleted Items nav properties bug
  • Adding a button at the bottom of a table view
  • Getting last autonumber in access
  • javaw.exe and eclipse startup problems
  • Get object from AWS S3 as a stream
  • Cross-Platform Protobuf Serialization
  • Validaiting emails with Net.Mail MailAddress
  • Deserializing XML into class C#
  • ActionScript 2 vs ActionScript 3 performance
  • Do I've to free mysql result after storing it?
  • How can I estimate amount of memory left with calling System.gc()?
  • Google cloud sdk not working when python points python3
  • Delete MySQLi record without showing the id in the URL
  • Apache 2.4 - remove | delete | uninstall
  • GridView Sorting works once only
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • Is there a mandatory requirement to switch app.yaml?
  • Rails 2: use form_for to build a form covering multiple objects of the same class
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • coudnt use logback because of log4j
  • need help with bizarre java.net.HttpURLConnection behavior
  • How to Embed XSL into XML