Beispiel #1
0
        public override TimerJobSchedule GetInterval(IGlobalConfigurationWidgetStore dataStore)
        {
            var data = dataStore.Get <TimerJobSchedule>(AppGuid);

            if (data == null || data.Value == null)
            {
                return(new TimerJobSchedule(5));
            }
            return(data.Value);
        }
Beispiel #2
0
        public override TimerJobSchedule GetInterval(IGlobalConfigurationWidgetStore dataStore)
        {
            var data = dataStore.Get <TimerJobSchedule>(AppGuid);

            if (data == null || data.Value == null || (data.Value.Cron.IsEmpty() && data.Value.IntervalInHours.GetValueOrDefault() == 0 && data.Value.IntervalInMinutes.GetValueOrDefault() == 0))
            {
                return(new TimerJobSchedule(60));
            }

            return(data.Value);
        }
Beispiel #3
0
        public override TimerJobSchedule GetInterval(IGlobalConfigurationWidgetStore dataStore)
        {
            var data = dataStore.Get <TimerJobSchedule>(AppGuid);

            if (data == null || data.Value == null || (data.Value.Cron.IsEmpty() && data.Value.IntervalInHours.GetValueOrDefault() == 0 && data.Value.IntervalInMinutes.GetValueOrDefault() == 0))
            {
                int interval = GeminiApp.Config.EmailAlertsPollInterval.ToInt();

                return(new TimerJobSchedule(interval == 0 ? 5 : interval));
            }

            return(data.Value);
        }
        public override TimerJobSchedule GetInterval(IGlobalConfigurationWidgetStore dataStore)
        {
            var data = dataStore.Get<TimerJobSchedule>(AppGuid);

            if (data == null || data.Value == null || (data.Value.Cron.IsEmpty() && data.Value.IntervalInHours.GetValueOrDefault() == 0 && data.Value.IntervalInMinutes.GetValueOrDefault() == 0))
            {
                int interval = GeminiApp.Config.EmailAlertsPollInterval.ToInt();

                return new TimerJobSchedule(interval == 0 ? 5 : interval);
            }

            return data.Value;
        }
        public override TimerJobSchedule GetInterval(IGlobalConfigurationWidgetStore dataStore)
        {
            var data = dataStore.Get<TimerJobSchedule>(AppGuid);

            if (data == null || data.Value == null || (data.Value.Cron.IsEmpty()
                && data.Value.IntervalInHours.GetValueOrDefault() == 0
                && data.Value.IntervalInMinutes.GetValueOrDefault() == 0))
            {
                // Default interval for timer app
                return new TimerJobSchedule(5);
            }

            return data.Value;
        }