Scheduled Task in DotNetNuke 4.0
DotNetNuke offers the possibility of schedule some tasks. In this document you will get the instructions to create a scheduled task. This is valid for .NET framework 1.1. The problem is that we need to specify where the assembly that contains the scheduled task is, and the compilation model in ASP.NET 2.0 compiles our classes dynamically and we cannot know what the assembly that contains the class is.
In this post of Shaun Walker we can get a solution. He proposes to publish our web site in order to get the assemblies of our portal. This solution is a good solution when you need to deploy the website, but when you are developing the scheduled tasks you have to publish all website to get the assembly. This is a waste of time and it is not necessary. We can generate the assembly from the command line in a few seconds. These are the steps:
- Create a SchedulerClient task. The class in the above document can be used as example.
- Save the file as “Scheduler.cs” for example.
- Compile the assembly from command line. If you are using VS 2005 you can do it from “Visual Studio 2005 Command Prompt” inside “Visual Studio Tools”. A valid command might be:
csc /target:library /out:Scheduler.dll /r:.\ReferenceAssembly.dll,
.\DotNetNuke.dll /recurse:Scheduler.cs - Copy the generated assembly (Scheduler.dll) in the bin directory of the DotNetNuke portal.
- At this point you can follow the instructions in the document to configure the scheduled task.
1 Comments:
The document you link to explain this information does not allow folks to view it. We are getting 'you do not have permission to view this document'. Can you correct the issue or post another link to the doc that works?
Post a Comment
<< Home