Beispiel #1
0
        /// <summary>
        /// Notifies the scheduler listeners about job that was unscheduled.
        /// </summary>
        public virtual void NotifySchedulerListenersUnscheduled(TriggerKey triggerKey)
        {
            // build a list of all scheduler listeners that are to be notified...
            IList<ISchedulerListener> schedListeners = BuildSchedulerListenerList();

            // notify all scheduler listeners
            foreach (ISchedulerListener sl in schedListeners)
            {
                try
                {
                    if (triggerKey == null)
                    {
                        sl.SchedulingDataCleared();
                    }
                    else
                    {
                        sl.JobUnscheduled(triggerKey);
                    }
                }
                catch (Exception e)
                {
                    log.ErrorFormat(
                        CultureInfo.InvariantCulture,
                        "Error while notifying SchedulerListener of unscheduled job. Trigger={0}",
                        e,
                        (triggerKey == null ? "ALL DATA" : triggerKey.ToString()));
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Notifies the scheduler listeners about job that was unscheduled.
        /// </summary>
        public virtual async Task NotifySchedulerListenersUnscheduled(TriggerKey triggerKey)
        {
            // build a list of all scheduler listeners that are to be notified...
            IList<ISchedulerListener> schedListeners = BuildSchedulerListenerList();

            // notify all scheduler listeners
            foreach (ISchedulerListener sl in schedListeners)
            {
                try
                {
                    if (triggerKey == null)
                    {
                        await sl.SchedulingDataCleared().ConfigureAwait(false);
                    }
                    else
                    {
                        await sl.JobUnscheduled(triggerKey).ConfigureAwait(false);
                    }
                }
                catch (Exception e)
                {
                    log.ErrorFormat(
                        "Error while notifying SchedulerListener of unscheduled job. Trigger={0}",
                        e,
                        (triggerKey == null ? "ALL DATA" : triggerKey.ToString()));
                }
            }
        }
Beispiel #3
0
 public void TriggerResumed(TriggerKey triggerKey)
 {
     Sitecore.Diagnostics.Log.Info(String.Format("SchedulerListener.TriggerResumed for trigger {0} at {1}", triggerKey.ToString(), DateTime.Now), this);
 }
Beispiel #4
0
 public void JobUnscheduled(TriggerKey triggerKey)
 {
     Sitecore.Diagnostics.Log.Info(String.Format("SchedulerListener.JobUnScheduled with trigger {0} at {1}", triggerKey.ToString(), DateTime.Now), this);
 }
Beispiel #5
0
 public void TriggerResumed(TriggerKey triggerKey)
 {
     Sitecore.Diagnostics.Log.Info(String.Format("SchedulerListener.TriggerResumed for trigger {0} at {1}", triggerKey.ToString(), DateTime.Now), this);
 }
Beispiel #6
0
 public void JobUnscheduled(TriggerKey triggerKey)
 {
     Sitecore.Diagnostics.Log.Info(String.Format("SchedulerListener.JobUnScheduled with trigger {0} at {1}", triggerKey.ToString(), DateTime.Now), this);
 }