To create a scheduled task in Sitecore, first you must create the .NET class that will contain the logic that you wish to execute. In the example below I’m simply logging a message whenever the task is run.
Your method must accept three arguments.
- An array of items that can be specified in a later step when you define the command’s schedule.
- The Sitecore task CommandItem
- The Sitecore task ScheduleItem