Skip to content

Scheduling a Task

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.

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.