Import POP3 content: Create the task
To create a task, perform the following:
- Open Sitefinity CMS Project Manager.
- Select your Sitefinity CMS project.
- Click Edit in Visual Studio.
- From the context menu of the project, click Add » New Item...
- In the left pane, select Visual C# » Code.
- Click Class.
- In the Name input field, enter PipeScheduledTask.cs.
- Open the newly created file.
- Add the following code:
In the code above, ExecuteTask method you get the feed from the publishing system and execute it. You must also set the TaskName to reflect the full class name so that the system can properly instantiate the task from the factory and execute it at a specified point. Once the task is executed you must invoke the scheduling manager and queue a new task of the same type.