schedular class in dnn490

Last post 12-08-2008 6:48 AM by sainyam2003. 0 replies.

Sort Posts:

  • schedular class in dnn490

    12-08-2008, 6:48 AM
    • Member
      point Member
    • sainyam2003
    • Member since 02-09-2007, 9:00 AM
    • india
    • Posts 5

     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.

    Sainyam
Page 1 of 1 (1 items)