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.0Error in making a new scheduler - Help me!Error in making a new scheduler - Help me!
Previous
 
Next
New Post
6/17/2007 2:33 PM
 

Hi every body !

I'm using DNN 4.5.3 and I'm trying to create a schedule that will automatically insert 10 sample record into a table( here is Category table)
My code is :

 

Imports Microsoft.VisualBasic

Namespace DotNetNuke.Modules.News

    Public Class ScheduleSample

        Inherits DotNetNuke.Services.Scheduling.SchedulerClient

 

        Public Sub New(ByVal objScheduleHistoryItem As DotNetNuke.Services.Scheduling.ScheduleHistoryItem)

            MyBase.new()

            Me.ScheduleHistoryItem = objScheduleHistoryItem

        End Sub

        Private Sub InsertTenSampleRecord()

 

            Dim objController As New NewsController

 

            ' Insert 10 sample records into table Category

            Me.Status = "Inserting Item"

            For i As Integer = 1 To 10

                Dim objCategory As New CategoryInfo

                objCategory.CategoryName = "schedule Category"

                objController.AddCategory(objCategory)

            Next

            Me.Status = "Insert Item Successfully"

            Me.ScheduleHistoryItem.Succeeded = True

 

        End Sub

        Public Overrides Sub DoWork()

            Try

                'notification that the event is progressing

                Me.Progressing()    'OPTIONAL

                InsertTenSampleRecord()

                Me.ScheduleHistoryItem.Succeeded = True     'REQUIRED

                Me.ScheduleHistoryItem.AddLogNote("Insert completed.")

 

            Catch exc As Exception    'REQUIRED

                Me.ScheduleHistoryItem.Succeeded = False    'REQUIRED

                Me.ScheduleHistoryItem.AddLogNote("Insert failed." + exc.ToString)    'OPTIONAL

 

                'notification that we have errored

                Me.Errored(exc)    'REQUIRED

                'log the exception

                LogException(exc)    'OPTIONAL

            End Try

        End Sub

    End Class

End Namespace

Then, I logged as host,

I added a new item to Schedule as:

Full Class Name and Assembly :  DotNetNuke.Modules.AI.News.ScheduleSample, DOTNETNUKE
Schedule Enabled : ticked yes
Time Lapse: 1 minutes
Retry Frequency : 2 minutes
Retain Schedule History: 10
Run on Event: none
Catch Up Enabled: no
Object Dependencies: Category


But my class seems to be never called and no record is inserted
Do I have any bugs? or what have i done wrong?
Do i need to change the web.config file?

Please help me! Thank you very much!

 

 


Đời đôi khi rất dở. Chẳng biết thế tró nào mà lần. Thôi thì đành niềm nở. Đời đúng là quái gở....
 
New Post
6/18/2007 3:33 AM
 

Ah. I have found the reason that because i don't have the dll file.

Please show me how to add a new project or to build for .dll file in DNN4?

 


Đời đôi khi rất dở. Chẳng biết thế tró nào mà lần. Thôi thì đành niềm nở. Đời đúng là quái gở....
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Error in making a new scheduler - Help me!Error in making a new scheduler - Help me!


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