Пример #1
0
 public string RunSheduledCampaigns(int emailBatchSize = 50, int smsBatchSize = 50)
 {
     ScheduleService scheduleService = new ScheduleService();
     scheduleService.RunScheduledCampaigns(emailBatchSize, smsBatchSize);
     return "SUCCESS";
     //Timer timer =
 }
Пример #2
0
        public bool CanStartJob()
        {
            JobService jobService = new JobService();
            bool hasJobCompleted =  jobService.IsLastJobCompleted();

            ScheduleService scheduleService = new ScheduleService();
            bool hasScheduledCampaigns  = scheduleService.HasScheduledCampaigns();

            if (hasJobCompleted && hasScheduledCampaigns)
            {
                return true;
            }
            return false;
        }
Пример #3
0
 public ActionResult Schedules(int messageId = 0)
 {
     var schedules = new ScheduleService().GetSchedules().OrderBy(p => p.StartTime);
     return View(schedules);
 }
Пример #4
0
 public string RunSheduledSmsCampaigns(int size = 50)
 {
     ScheduleService scheduleService = new ScheduleService();
     scheduleService.RunScheduledCampaignsByType((int)CampaignType.SMS, size);
     return "SUCCESS";
 }
Пример #5
0
 public IEnumerable<Schedule> GetSchedules()
 {
     //ErrorMethod();
     ScheduleService scheduleService = new ScheduleService();
     return scheduleService.GetSchedules();
 }