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.0Creating a scheduled taskCreating a scheduled task
Previous
 
Next
New Post
7/31/2006 12:05 PM
 
First, let me begin by saying the reason I am posting is that the DNN documentation on creating a scheduled task is sparse... and I have been unable to find a relevant post in this forum and the asp.net forum.

My question is this:  I have created a scheduled task but I do not know how to reference the assembly and full class name.  The DNN documentation tells me to use the dropdown control on the add item to schedule page.  but this was discontinued as of 3.0?? (I am using 4.x).  I am definately a noob, so I am having trouble discerning how to find these.  here is my code...

Imports Microsoft.VisualBasic
Imports System.io

Public Class MLSUpdate


    Inherits DotNetNuke.Services.Scheduling.SchedulerClient
#Region "declarations"
    This section redacted for post
#End Region
  

    Public Sub New(ByVal objschedulehistoryItem As _
    DotNetNuke.Services.Scheduling.ScheduleHistoryItem)
        MyBase.new()
        Me.ScheduleHistoryItem = objschedulehistoryItem 'required
    End Sub
    Public Overrides Sub dowork()



        Try
            Me.Progressing() 'notification of event progressing this is optional

            'do work
            work()


        Catch ex As Exception
            Me.ScheduleHistoryItem.Succeeded = False 'required
            Me.ScheduleHistoryItem.AddLogNote(String.Format( _
            "Custom error message.", _
            ex.ToString))  'optional error message
            Me.Errored(ex) 'required error notification
            ' logexception(ex)  'optional error logging

        End Try


    End Sub
    Private Sub work()
          'this section redacted for post
    End Sub
End Class

This compiles into a file called updatetest.dll and has a namespace of updatetest according to the project properties.

I then take the dll and place it in the bin directory.
I add a scheduled item with updatetest.updatetest.MLSUpdate, updatetest
DNN crashes
next i remove this item and try
updatetest.MLSUpdate, updatetest
DNN crashes

I have tried every combination possible, as well as simplifying my code to rule out any errors in my functions.  Any help is appreciated.

Regards,
     Jonathan
 
New Post
7/31/2006 6:04 PM
 

Hi Jonathan,

Its Fully Qualified NameSpace & Class, AssemblyName.

So it should look something like this...

YourCompany.DNN.Modules.ModuleName.ScheduledWorker, YourCompany.DNN.Modules.ModuleName

HTH's,

Dave

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Creating a scheduled taskCreating a scheduled task


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