Skip to main content

Scheduler

The Scheduler is a core component responsible for orchestrating the timely execution of management and automation tasks. It serves as the control center for running tasks, handling task queues, and maintaining an organized history of task executions. To achieve these tasks, we utilize the Quartz Scheduler as the underlying implementation.

A scheduled task is characterized by parameters, each contributing to its effective execution:

  • Name: A descriptive label assigned to the task.
  • Task Type: Specifies the nature of the task to be executed.
  • One Time Only: Determines if the task is intended for a single execution.
  • System Job: Identifies whether the task is a system job, thus preventing unauthorized modifications.
  • Enabled: Indicates if the task is active and ready for execution.
  • Last Execution Status: Provides information about the outcome of the latest execution.
  • Cron Expression: A specialized syntax that defines when the task should be executed.

Supported task types

The Scheduler supports a range of task types, catering to various aspects of the platform's functionality

Task typeDescriptionReference
Certificate discoveryInitiates the certificate discovery process based on definitionsDiscoveryCertificateTask
Certificate status updateUpdate certificate status, validation, and complianceUpdateCertificateStatusTask
Update Intune revocation requestsManages updates of revocation requests in IntuneUpdateIntuneRevocationRequestsTask

Task execution mechanism

Tasks within the Scheduler are executed based on a defined cron expression. A cron expression is a string comprising 6 or 7 fields, each indicating different aspects of the schedule. These fields include seconds, minutes, hours, day of month, month, day of week, and optionally, the year.

The cron expression allows for special characters such as *, -, ,, /, L, W, and ? to define intricate execution patterns.

Field nameMandatoryAllowed valuesAllowed special characters
SecondsYes0-59* / , -
MinutesYes0-59* / , -
HoursYes0-23* / , -
Day of monthYes1-31* / , - ? L W
MonthYes1-12 or JAN-DEC* / , -
Day of weekYes0-6 or SUN-SAT* / , - ? L W
YearNoempty, 1970–2099* / , -

Special characters meaning

The following special characters are allowed:

CharacterDescription
*all values
?no specific value
-range of values
,value list separator
/step values
Llast day of the month
Wweekday

For more detailed explanations and additional examples, consult the Cron Trigger Tutorial.

Task execution history

The Scheduler meticulously maintains a history of task executions, capturing essential details such as:

  • Start time of execution
  • End time of execution
  • Duration of execution
  • Execution status

Additionally, the execution history may encompass supplementary information and references to objects that were processed by the task.

The Scheduler stands as an essential component within the platform, enabling the systematic execution of management and automation tasks. By mastering the concepts of Scheduled Tasks, Cron Expressions, and Execution History, users gain a thorough understanding of how to utilize this feature effectively.