Delay each record's steps with a Schedule Expression
Normally, each record's steps run as soon as the process fetches it. A Schedule Expression holds each record back until a time you choose, worked out either from now or from a date on the record.
The two forms
| Expression | Each record's steps run… |
|---|---|
{dynamic:DateTimeNow:N} | N minutes after the process fetched the records. DateTimeNow is the only option here. |
{recordData:FieldName:N} | N minutes from the date in the record's FieldName field. Use a negative N for before the date and a positive N for after. |
Examples:
{dynamic:DateTimeNow:30}: 30 minutes after the run.{recordData:CourseStartDate:-1440}: 1,440 minutes (24 hours) before each record'sCourseStartDate.{recordData:CourseStartDate:120}: 2 hours after it.
Type the expression exactly as shown, with no spaces. dynamic and recordData must be written in that case. The field name uses the dataset's As name.
Rules to follow
- The time must be in the future. If any record's time has already passed, the run stops and is marked Failed. With
DateTimeNow, N must be at least 1. - The field must exist and hold a date on every record. If it's missing or isn't a date, the run fails.
- Filter your dataset so each record is fetched only once. Each run schedules a separate delayed job for every record it fetches. If the same record comes back on the next run, it is scheduled again and the email or message is sent twice. Use dataset filters to fetch only records that are new since the last run, or that fall in a window that matches your schedule.
- The next run waits. A run isn't finished until every delayed record has been handled, so the next run is scheduled Schedule Period Minutes after the last delayed record.
Seeing delayed records
Records waiting for their time appear on the process's Jobs tab as Process Record jobs with a Run at time, and in the In-flight column on the dashboard.
The Test tab ignores the Schedule Expression, so a test won't warn you about times in the past.
Errors you might see
Invalid scheduleExpression '…'. Expected format: {dynamic:DateTimeNow:<minutes>} or {recordData:<key>:<minutes>}Unknown dynamic key '…'. Only 'DateTimeNow' is supported.recordData key '…' not found in record.recordData['…'] value '…' cannot be parsed as a DateTime.scheduleExpression '…' resolved to a time in the past (…).