23. Scheduled Workflows
Overview
Scheduled Workflows allow administrators to configure processes for automatic, recurring execution. The system periodically checks all enabled schedules and starts matching processes without any manual intervention.
How It Works
A background scheduler runs every 60 seconds and evaluates all enabled schedules. When a schedule is due, the system starts the configured process using runtimeService.startProcessInstanceByKey() with the stored initiatorEmail set as the ${initiator} process variable.
Scheduling Capabilities
| Frequency | Behavior | Configuration |
|---|---|---|
| DAILY | Fires once per day on the first check | No additional config |
| WEEKLY | Fires on a specific day of the week | dayOfWeek (1=Monday .. 7=Sunday) |
| MONTHLY | Fires on a specific day of the month | dayOfMonth (1-31) |
| EVERY_N_DAYS | Fires every N days from the last execution | intervalDays (e.g., 3 = every 3 days) |
Start Form Restriction
⚠️ Important: Only processes without start form properties can be scheduled. Processes that require user input (start form fields) cannot be automatically started because there is no user present to fill in the form. The admin UI enforces this constraint — the process dropdown only shows eligible processes.
Initiator
The initiatorEmail field determines who the process runs "as" (the ${initiator} variable). It is automatically set based on the logged-in user:
- On create: captures the admin who created the schedule.
- On re-enable (toggle): updates to the admin who re-enabled it.
This ensures the ${initiator} always reflects the last person who activated the schedule.
Missed Executions
There is no catch-up mechanism. If the server is down when a schedule was due to fire, that execution is simply skipped. The next check after the server restarts will evaluate normally based on the current date.
Execution Status
Each schedule tracks its last execution result:
| Status | Meaning |
|---|---|
SUCCESS |
Process started successfully. The process instance ID is recorded. |
FAILED |
An error occurred during startup (e.g., engine error). |
PROCESS_NOT_FOUND |
The process definition key no longer exists in the engine. |
Admin UI
The Schedules page is available under Administration > Schedules (admin role only). From this page you can:
- Create a new schedule by selecting a process and frequency
- Edit an existing schedule's process or frequency
- Toggle a schedule on/off (re-enabling updates the initiator)
- Delete a schedule permanently
- View last execution time, status, and process instance ID
Timezone
All schedule evaluations use server time (LocalDate.now() / LocalDateTime.now()). There is no timezone configuration — the server's JVM timezone applies.