Import POP3 content: Create the task

To create a task, perform the following:

  1. Open Sitefinity CMS Project Manager.
  2. Select your Sitefinity CMS project.
  3. Click Edit in Visual Studio.
  4. From the context menu of the project, click Add » New Item...
  5. In the left pane, select Visual C# » Code.
  6. Click Class.
  7. In the Name input field, enter PipeScheduledTask.cs.
  8. Open the newly created file.
  9. 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.

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?