Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Scheduler Class not FiringScheduler Class not Firing
Previous
 
Next
New Post
10/14/2008 12:59 AM
 

Dear Nuke Friends,

getting desperate here! My scheduler class does not fire after setting it to do so. I made it smaller to test, it just write a log text file. I've created a new DNN site using VS2005 template and I can run it normally. Than I added a class library project and here is the code of my class:

Imports System.IO
Imports DotNetNuke

Namespace GpVirtual
    Public Class ImportRFactorXML
        Inherits DotNetNuke.Services.Scheduling.SchedulerClient

        Public Sub New(ByVal objScheduleHistoryItem As DotNetNuke.Services.Scheduling.ScheduleHistoryItem)
            MyBase.new()
            Me.ScheduleHistoryItem = objScheduleHistoryItem 'REQUIRED
        End Sub

        Public Overrides Sub DoWork()
            EscreveLog("Comecei!")
            Try
                'notification that the event is progressing
                'this is optional
                Me.Progressing() 'OPTIONAL

                Me.ScheduleHistoryItem.Succeeded = True 'REQUIRED
            Catch exc As Exception 'REQUIRED
                Me.ScheduleHistoryItem.Succeeded = False 'REQUIRED
                Me.ScheduleHistoryItem.AddLogNote(String.format("Archiving log files failed.", exc.ToString)) 'OPTIONAL
                'notification that we have errored
                Me.Errored(exc) 'REQUIRED
                'log the exception
                'LogException(exc) 'OPTIONAL           
            End Try
        End Sub

        Private Sub EscreveLog(ByVal strMsg As String)
            Dim oStrWriter As New StringWriter
            Using sw As StreamWriter = New StreamWriter("c:\log.txt", True)
                sw.WriteLine(Now() & " - " & strMsg)
            End Using
        End Sub
    End Class
End Namespace

It does not work, nothing in history...set to fire every 2mins...please HELP-ME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 
New Post
10/14/2008 11:57 AM
 

I registered in scheduler settings this way: GpVirtual.ImportRFactorXML, ImportRFactorXML

MAC wrote

Dear Nuke Friends,

getting desperate here! My scheduler class does not fire after setting it to do so. I made it smaller to test, it just write a log text file. I've created a new DNN site using VS2005 template and I can run it normally. Than I added a class library project and here is the code of my class:

Imports System.IO
Imports DotNetNuke

Namespace GpVirtual
    Public Class ImportRFactorXML
        Inherits DotNetNuke.Services.Scheduling.SchedulerClient

        Public Sub New(ByVal objScheduleHistoryItem As DotNetNuke.Services.Scheduling.ScheduleHistoryItem)
            MyBase.new()
            Me.ScheduleHistoryItem = objScheduleHistoryItem 'REQUIRED
        End Sub

        Public Overrides Sub DoWork()
            EscreveLog("Comecei!")
            Try
                'notification that the event is progressing
                'this is optional
                Me.Progressing() 'OPTIONAL

                Me.ScheduleHistoryItem.Succeeded = True 'REQUIRED
            Catch exc As Exception 'REQUIRED
                Me.ScheduleHistoryItem.Succeeded = False 'REQUIRED
                Me.ScheduleHistoryItem.AddLogNote(String.format("Archiving log files failed.", exc.ToString)) 'OPTIONAL
                'notification that we have errored
                Me.Errored(exc) 'REQUIRED
                'log the exception
                'LogException(exc) 'OPTIONAL           
            End Try
        End Sub

        Private Sub EscreveLog(ByVal strMsg As String)
            Dim oStrWriter As New StringWriter
            Using sw As StreamWriter = New StreamWriter("c:\log.txt", True)
                sw.WriteLine(Now() & " - " & strMsg)
            End Using
        End Sub
    End Class
End Namespace

It does not work, nothing in history...set to fire every 2mins...please HELP-ME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 
New Post
10/15/2008 2:14 PM
 

Solved! My problem was Namespace, I guess; I wrote my class again removing Namespace and renaming its name and it works locally!

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Scheduler Class not FiringScheduler Class not Firing


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out