c# - Quartz.Net - Every 3 months -


I'm trying to call quartz.net every 3 months (quarter) (static and the latest version 2 Using) the beta with the same result).

Do I make the cron trigger 0 30 8 3 * / 3?

So, technically, I expect to trigger it tomorrow on September 2. Although it shows as the next run time, why is it next month?

Updated: According to the answer, I made the following method - can be useful for anyone:

  Calculate the public static string interval (int startMonth, int interval) {Var months = new list & lt; String & gt; (); Var "name", "ef", "mar", "apr", "me", "june", "joule", "augi", "sep", "oct", "novy", "dec"}; Var month selector = start time interval; (Var i = 0; i & lt; 12; i ++) {if (i% interval == month selector) {months.Add (mahananam [i]); }} Return string .jound (",", months. Aoure ()); }   

Ps: I did not use the index for months because it was not working well with my quartz (v2 beta) for some reason. Apart from this, the DB level can also be easily read.

Example call - every 3 months based on start:

  var cronMonths = CronUtils.CalculateMonthsWithInterval ((startdate.Month - 1), 3); Well I think this is because the scheduler will verify which month can be divided by 3, since all months in quartz are based on 0 (according to :), which will be scheduled for months January, April, July and Will be October.  
  0 mod 3 = 0 - & gt; Jane 1 mod3 = 1 - & gt; FB ... 8 Mod3 = 2 - & gt; SEP 9 mod 3 = 0 - & gt; OCT   

The quartz scheduler will analyze your cron's expression and keep only those places where their modulus is 3 is equal to 0.

If you want to be 1 month before March, June, September and October) you have to set it up:

0 30 8 March 3, SEP, DEC? *

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -