Forum


HomeHomePublicPublicDevelopmentDevelopmentDNN 7.4.2 custom Module Scheduling problemDNN 7.4.2 custom Module Scheduling problem
Previous
 
Next
New Post
11/22/2016 7:02 AM
 

Hi,

I created a Scheduled task to perform some task on module using DNN 07.04.02 (216)

In the setting, I have set the frequency as 60 Min

I tried debugging to check if the scheduler is working.

I can debug the scheduled task.

But the same task is triggered again within two after the previous execution.

 I have added a screenshot of the scheduler execution log.

 


 

screen shot of scheduler setting 

Code in the Scheduler

public class RemoveExpiredSubscription : SchedulerClient
    {
      public  RemoveExpiredSubscriptionsRepository RemoveExpiredSubscriptionRepo  
        
      public  RemoveExpiredSubscription(ScheduleHistoryItem oSchedHistoryItem) :base()
        {
            ScheduleHistoryItem = oSchedHistoryItem;
           
        }
        public override void DoWork()
        {
            try
            {
                RemoveExpiredSubscriptionRepo = new BusinessLogic.RemoveExpiredSubscriptionsRepository();

                this.Progressing();
                ScheduleHistoryItem.AddLogNote(" Checking Expired Company Subscriptions!");
                RemoveExpiredSubscriptionRepo.ProcessCompanySubscription(0);
                ScheduleHistoryItem.AddLogNote("Finished checking Expired Company Subscriptions!");
                ScheduleHistoryItem.AddLogNote("--");
                ScheduleHistoryItem.AddLogNote("Checking Individual Subscriptions!");
                RemoveExpiredSubscriptionRepo.ProcessIndividualUserSubscription(0);
                ScheduleHistoryItem.AddLogNote("Finished Individual Subscriptions!");
                ScheduleHistoryItem.Succeeded = true;
               
                
                this.Completed();
               

            }
            catch (Exception ex)
            {
                ScheduleHistoryItem.AddLogNote("Failed. " + ex.ToString());
                ScheduleHistoryItem.Succeeded = false;
                Errored(ref ex);
            }
        }
           
    }


Please let me know if I am doing something wrong

 

 
New Post
12/2/2016 12:25 AM
 

This was fixed after enabling Catch Up Enabled option for the schedule

 
New Post
12/2/2016 4:50 AM
 
Thanks for letting us know Purple - I sent this to Scott but I think he was clueless as well :)
 
Previous
 
Next
HomeHomePublicPublicDevelopmentDevelopmentDNN 7.4.2 custom Module Scheduling problemDNN 7.4.2 custom Module Scheduling problem



Try FREE
30 days money back guaranteed