DNN Scheduler 不会运行我的自定义计划
我创建了一个类库并确保它继承
DotNetNuke.Services.Scheduling.SchedulerClient
然后重写了 DoWork() 子函数。
然后在dnn主机设置>调度程序添加了一个新的调度程序项目。
在标记为:完整类名和程序集的文本框中:
Namespace.Classname, Dllname
选中启用计划框并添加 5 分钟的运行时间间隔并启用追赶。
还添加了该类使用的表列表。并保留 5 条历史记录
,然后保存它,
在查看调度状态中我得到:
Name | Next Start | OverDue(s) | Time Remaining
Sub reminder | 11/12/2010 9:52:02 AM | 3.5 | 0
在请求模式下使用调度程序。
预先感谢您的任何帮助。
更新:
好的,我创建了一个名为“SubRenewal”的新类库项目 将 vb 文件重命名为 Test 并将以下内容添加到文件中
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
在我放置的调度程序页面上: 友好名称测试器 全类名和程序集 Matts.Test,SubRenwal 启用 是 延时 10 秒 重新频率 - 事件无时运行 将其他所有内容留空并保存。计划程序或项目历史记录中仍然没有任何内容。事件查看器中也没有任何内容
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我建议按照以下步骤开始调度程序开发和调试:
请注意,一旦您添加新的计划程序项目,它将触发计划程序。
我希望这会对您有所帮助。我建议删除您已有的调度程序条目,重置您的网站实例(iis或asp.net开发服务器)并尝试使用上述方法再次添加它
希望这会对您有所帮助
I would suggest following steps to get started with scheduler development and debugging:
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
首先我要感谢 Lakhlan,没有他的帮助我就不会发现这个错误。
我相信问题是两件事之一,第一件事是我正在注册对另一个自定义模块的引用,以允许我本地化一些输出文本。
另外,我在下面添加了新的构造函数,
再次感谢您为您的帮助投票,但不能:(
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
Thanks again would up vote you for your help but cant :(