Recurrence pattern in asynchronous job execution

 

Applies To: Dynamics CRM 2015

You can execute asynchronous system operations one time or on a recurring basis by using a recurrence rule. Use the AsyncOperation.RecurrencePattern attribute to specify the recurrence rule. This property is included in the request classes of the IOrganizationService messages that submit asynchronous jobs, such as bulk delete, or bulk detect duplicates. It is also included in the entities that represent asynchronous operations, such as the AsyncOperation (system job) entity.

Use the following format to set the AsyncOperation.RecurrencePattern attribute.

Recurrence pattern

Frequency of job execution

"FREQ=MONTHLY;"

Once a month

"FREQ=WEEKLY;"

Once a week

FREQ=DAILY;"

Once a day

"FREQ=HOURLY;"

Once an hour

Note

A complete format for a recurrence rule is described in the RFC2445 Internet standard (Internet Calendaring and Scheduling Core Object Specification).

You can specify how frequently you want to repeat the recurrence rule by using an INTERVAL part of the rule. For example, to execute a job every three days, use the following format: "FREQ=DAILY;INTERVAL=3;". The INTERVAL is an optional part of the recurrence rule. If you do not specify INTERVAL, it is set to 1.

To run an asynchronous job without recurrence, set this property to a value that is specified in the AsyncOperation.RecurrencePattern property programming reference topic for a particular message request class or an entity.

To specify the start time of the job execution, use the AsyncOperation.RecurrenceStartTime property or the StartDateTime property in the message request classes or in the records that represent asynchronous operations. If the property is not set, the start time is set to the value that is contained in the DateTime.Now property.

See Also

RecurrencePattern
StartDateTime
RecurrencePattern
RecurrenceStartTime
Delete data in bulk
AsyncOperation (system job) entity
Asynchronous service in Microsoft Dynamics CRM
Supported entities for asynchronous operations

© 2016 Microsoft. All rights reserved. Copyright