Schedule a task

  1. Create an instance of your scheduled task class.
  2. Set the execution time and other custom properties, if required.
    You can set the execution time in one of the following ways:
    • Use the ExecutionTime property.
      You sets the exact execution date.
    • Use the ScheduleSpec property.
      You describe the scheduled specification using the cron syntax.
      When using this approach, you need to set the ScheduleSpecType to "crontab".
  3. To schedule the task, use the SchedulingManager.

EXAMPLE: The following example demonstrates the use of cron syntax:

Was this article helpful?