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