Hi All,
I have created a class which inherits SchedulerClient(DotNetNuke.Services.Scheduling.SchedularClient). I have set its output to my dnn bin directory, and added an item in host>schedule but it is showing overdue always. I am posting the code below:
Imports nySchedular.us.ippbx.remote
Imports DotNetNuke.Services.Scheduling
Namespace nyS.Schedular
Public Class nySchedular
Inherits SchedulerClient
Public Sub New(ByVal objScheduleHistoryItem As ScheduleHistoryItem)
MyBase.New()
Me.ScheduleHistoryItem = objScheduleHistoryItem
End Sub
Public Overrides Sub DoWork()
Try
Me.ScheduleHistoryItem.AddLogNote("Services started" + Date.Now.ToShortDateString())
Dim objCtrl As New GetProducts()
objCtrl.GetXmlData()
Me.ScheduleHistoryItem.Succeeded = True
Catch ex As Exception
Me.ScheduleHistoryItem.Succeeded = False
Me.ScheduleHistoryItem.AddLogNote("Service Failed: " + ex.Message)
Me.Errored(ex)
End Try
End Sub
End Class
End Namespace
Plase help me out.
Thanks in advance.