Skip to content

Run a Workflow Task on a Schedule

Scenario

Use this example when a task should be created or executed on a schedule instead of waiting for a user to trigger it manually.

What You Will Learn

  • configure recurring schedule rules for a module task
  • select an action automatically from task prework
  • route the scheduled result to a user role

Difficulty and Estimated Time

  • Difficulty: Intermediate
  • Estimated time: 20 minutes plus the schedule wait interval

Assumed Knowledge

You should be familiar with module tasks, task actions, prework scripts, and role assignment.

Required Reading

Prerequisites

  • permission to create module tasks
  • access to task scheduling settings and prework scripting
  • a user or role that should receive the scheduled work item

Steps

Create the Process

  1. Create a new process and open it in edit mode.
  2. Select the pool.
  3. Turn the opening task into a module-style scheduled task.
  4. Create the follow-up user task that will receive the scheduled notification or work.

Process layout with a scheduled start task and a follow-up task.

Configure the Schedule

  1. Open the calendar icon under the scheduled task.
  2. Enable the schedule.
  3. Fill the interval and schedule rules according to the required timing.

The example below shows a weekly schedule with an inverted daily range:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
<Schedule Name="Weekly Leave Request Report">
    <Rule Type="Weekly">
        <DayOfWeek>Sunday</DayOfWeek>
        <DayOfWeek>Tuesday</DayOfWeek>
        <DayOfWeek>Wednesday</DayOfWeek>
        <DayOfWeek>Thursday</DayOfWeek>
        <DayOfWeek>Friday</DayOfWeek>
        <DayOfWeek>Saturday</DayOfWeek>
    </Rule>
    <Rule Type="Daily">
        <Start>09:15:00</Start>
        <End>18:00:59</End>
        <Invert>True</Invert>
    </Rule>
</Schedule>

Task schedule editor showing interval and schedule rule sections.

Set the Scheduled Action in Prework

Open the prework of the scheduled task and select the action automatically:

1
$WorkItem.SelectedAction = 'Completed';

This lets the scheduled task advance without requiring a manual user click.

Assign the Role

  1. Add a role for the person who should receive the scheduled result.
  2. Assign that role to the follow-up task.

Role assignment for the task that receives the scheduled notification.

Create the Form

  1. Add the form used by the follow-up task.
  2. Insert a row-content section.
  3. Add a message widget or another widget that displays the scheduled content.

Form designer with a message widget used for scheduled output.

Test the Notification Flow

  1. Commit the process changes.
  2. Wait for the next scheduled interval.
  3. Open the worklist and verify that the scheduled task appears for the assigned user.

Worklist showing the scheduled task ready for the notified user.

Result

The process now creates or advances work automatically according to a defined schedule, and routes the resulting task to the intended user or role.

Verify the Result

Use a short test schedule, confirm that one execution creates or advances the expected work, and then restore the intended interval. Observe a second interval to ensure that the process does not create unintended duplicate work.

Security and Portability Notes

  • Schedules use the target environment's time zone and calendar configuration; verify both after import.
  • Resolve recipients through roles rather than fixed user identifiers.
  • If overlapping runs are possible, add an explicit concurrency guard and make writes idempotent.

What to Learn Next