예제 #1
0
        public static void AssignQuartzTrigger(this CronTriggerImpl cronTrigger, IXpandCronTrigger trigger)
        {
            cronTrigger.MisfireInstruction   = (int)trigger.MisfireInstruction;
            cronTrigger.CronExpressionString = trigger.CronExpression;
            // http://devexpress.com/Support/Center/p/S133718.aspx?searchtext=timezoneid+number
            // Fetches the Windows name of the specified Scheduler time zone from the registry.
            String timeZoneKey = RegistryTimeZoneProvider.GetRegistryKeyNameByTimeZoneId(trigger.TimeZone);

            cronTrigger.TimeZone = TimeZoneInfo.FindSystemTimeZoneById(timeZoneKey);
        }
예제 #2
0
 public override void AfterConstruction()
 {
     base.AfterConstruction();
     TimeZone = RegistryTimeZoneProvider.GetTimeZoneIdByRegistryKeyName(System.TimeZone.CurrentTimeZone.StandardName);
 }
예제 #3
0
 public static void AssignQuartzTrigger(this NthIncludedDayTrigger nthIncludedDayTrigger, INthIncludedDayTrigger trigger)
 {
     nthIncludedDayTrigger.MisfireInstruction = (int)trigger.MisfireInstruction;
     nthIncludedDayTrigger.N                             = trigger.N;
     nthIncludedDayTrigger.IntervalType                  = (int)trigger.IntervalType;
     nthIncludedDayTrigger.FireAtTime                    = string.Format(CultureInfo.InvariantCulture, "{0:00}:{1:00}:{2:00}", trigger.FireAtTime.Hours, trigger.FireAtTime.Minutes, trigger.FireAtTime.Seconds);
     nthIncludedDayTrigger.NextFireCutoffInterval        = trigger.NextFireCutoffInterval;
     nthIncludedDayTrigger.TimeZone                      = TimeZoneInfo.FindSystemTimeZoneById(RegistryTimeZoneProvider.GetRegistryKeyNameByTimeZoneId(trigger.TimeZone));
     nthIncludedDayTrigger.TriggerCalendarFirstDayOfWeek = trigger.TriggerCalendarFirstDayOfWeek;
     nthIncludedDayTrigger.TriggerCalendarWeekRule       = trigger.TriggerCalendarWeekRule;
 }