Custom Field for Task Schedule

As with most things Sitecore, John West has written extensively on agents and tasks. One part of configuring tasks that always seemed needlessly complicated is scheduling tasks. Since it's unlikely developers set this value very often it makes sense that making this more user-friendly isn't a high priority. 

But since I was already creating a custom field type for handling flag values I decided I'd also make a custom field type for handling task schedules. This post explains how to install and use the custom field type.

The task schedule format is fully documented. Be that as it may, it's still not something that's very easy to be able to enter without having to look it up. And even if you remember the format, you still have to deal with the flag value for the day of the week. Again, it's not a differential equation, but it's just difficult enough to keep everyday administrators away.

So I built a custom field type. This custom field type is similar to the flags field I recently wrote about. The both use a custom control to display a field value in a more user-friendly way.

  1. Install the installation package. You can download the package from GitHub (where you can also find the source code).
  2. Change the field type for the following field:
    • Template: /sitecore/templates/System/Tasks/Schedule
    • Field: Schedule
    • Type: Schedule

Now instead of a text box for editing the Schedule field on a Schedule item I have a button that will display a custom user interface for specifying the field value.