The tail end of last week, I created a custom scheduler implementing the SchedulerClient class listed below. It did not work initially when I built out the assembly to DotNetNuke's bin directory, which had me wondering if I had been doing something wrong. I kept going down the route of doing iisreset and deleting the temporary shadow copies of assemblies, which did not seem to work. Over the weekend, I come back in, I create a brand new class implementing the code below and it works.
I then thought to myself, is my older class working?!? Sure enough, as soon as both classes were repushed, the original started to work. Confused? I sure am. I then started to work on the actual code I want to implement as the originals were just my prototype, so I changed the timing of the intervals to an hour instead of every minute. As soon as I did this, an hour later, both schedulers were not working.
Anyone know what I should be doing to ensure when I put out class libraries implementing the SchedulerClient that they are running and up to date???
public class TestScheduleHistory : SchedulerClient
{
public TestScheduleHistory(ScheduleHistoryItem objScheduleHistoryItem)
{
this.ScheduleHistoryItem = objScheduleHistoryItem;
}
public override void DoWork()
{
try
{
this.Progressing();
//SchedulingProvider.Instance().PurgeScheduleHistory();
this.ScheduleHistoryItem.Succeeded = true;
this.ScheduleHistoryItem.AddLogNote("Schedule history test worked! Joseph Baggett");
}
catch (Exception exception1)
{
// ProjectData.SetProjectError(exception1);
Exception objException = exception1;
this.ScheduleHistoryItem.Succeeded = false;
this.ScheduleHistoryItem.AddLogNote("Schedule history test failed. Joseph Baggett" + objException.ToString());
this.ScheduleHistoryItem.Succeeded = false;
this.Errored(ref objException);
Exceptions.LogException(objException);
//ProjectData.ClearProjectError();
}
}
public void EmailEventLogMessages()
{
StringBuilder eventLogMessage = new StringBuilder();
try
{
if (!String.IsNullOrEmpty(eventLogMessage.ToString()) && eventLogMessage.ToString().Length > 0)
{
}
}
catch(Exception ex)
{
this.ScheduleHistoryItem.Succeeded = false;
this.ScheduleHistoryItem.AddLogNote("EmailEventLogMessages failed. " + ex.ToString());
this.ScheduleHistoryItem.Succeeded = false;
this.Errored(ref ex);
Exceptions.LogException(ex);
}
}
}