Matt
Matt

Reputation: 1038

DNN Scheduler won't run my custom schedule

I have created a class Library and made sure it inherits

DotNetNuke.Services.Scheduling.SchedulerClient

And have then overrided the DoWork() sub.

Then in dnn host settings > scheduler added a new scheduler Item.

in the textbox marked : Full Class Name and Assembly:

Namespace.Classname, Dllname

checked the Enable Schedule box and added a run time interval of 5mins and enabled catch up.

also added the list of tables that the class uses. and keep 5 records of history

I then saved it,

In the view schedule Status I get this:

Name          |  Next Start              |  OverDue(s)  | Time Remaining
Sub reminder  |  11/12/2010 9:52:02 AM   |  3.5         |  0

Using the scheduler in request mode.

Thanks in advance for any help.


Update :

Ok, I created a new class library project called "SubRenewal" Renamed the vb file Test and added the below to the file

Namespce Matts
 Public Class Test
  Inherits Dnn.Services.Scheduling.SchedulerClient
   Public overrides Sub DoWork()
     Me.ScheduleHistoryItem.addLogNote("I ran")
   end Sub
 End Class
End Namespace

On the Scheduler Page I put : Friendly Name Tester Full Class name and assembly Matts.Test,SubRenwal Enabled Yes Time Lapse 10 s Rety frequency - Run on Event None And left everything else blank and saved it. Still nothing in Scheduler or Item History. Also theres nothing in the event viewer

Upvotes: 3

Views: 1918

Answers (2)

Matt
Matt

Reputation: 1038

Firstly Id Like to thank Lakhlan, for his help without him I wouldnt of spotted the mistake.

I beleive the issue was one of two things first one is that I was registering a reference to another custom module to allow me to localise some of the output text.

Also I added the new constructor below

Public Sub New(ByVal objSceduleHistoryItem As DotNetNuke.Services.Scheduling.ScheduleHistoryItem)
        MyBase.New()
        Me.ScheduleHistoryItem = objSceduleHistoryItem
    End Sub

Thanks again would up vote you for your help but cant :(

Upvotes: 2

Prashant Lakhlani
Prashant Lakhlani

Reputation: 5806

I would suggest following steps to get started with scheduler development and debugging:

  • Create a new class library probject and add reference of dotnetnuke and related dlls in it
  • add reference of the same project to your dnn project
  • add a new vb or c# file to implement scheduler
  • add code lines to create entries in schedule history and no other code
  • test your scheduler
  • register your new scheduler from dotentnuke website host account

Please note that as soon as you add a new scheduler item, it will fire the scheduler. I hope this will help you. I will suggest to remove the entry of scheduler you already having, reset your website instance ( iis or asp.net development server) and try adding it again using the above method

Hope this will help you

Upvotes: 2

Related Questions