Frequency and Windows
A task’s schedule is a frequency in minutes, optionally narrowed by a window and a cap.
Where to find it
Architect Panel → Automation:
- Tasks — the scheduled tasks themselves
- Task Log — every execution and its result
Frequency is minutes
Not a cron expression. A task with a frequency of five runs every five minutes; sixty is hourly; 1440 is daily. A frequency of zero means it runs on every engine pass.
Simple, and it means "run at 2am precisely" is expressed as a daily frequency with an active window rather than as a schedule syntax.
Choose the longest frequency that works
Every run costs something, and most tasks do not need to be as frequent as they are set. A reminder task running every minute is doing nothing 1,439 times a day.
Ask what the acceptable delay actually is, and set the frequency to that.
Active windows
A start and end time confining a task to part of the day. That is how heavy work is kept overnight, and how anything that contacts people is kept to reasonable hours.
Anything sending a message to a person should have a window. A notification at three in the morning is worse than no notification.
Start and end dates
A task can be bounded by dates as well. Useful for a migration, a campaign or anything temporary — and it means the task stops on its own rather than being remembered.
Maximum runs
A cap on how many times it will ever run. That is how a one-off job is expressed: a frequency, and a maximum of one.
It is also a safety net on anything new — cap it at a handful of runs while you watch what it does.
Preview mode
The task runs and reports what it would have done without doing it. Use it whenever a task acts on records or sends anything, and use it every time you change one.
Stagger the schedule
Tasks all set to run at midnight run at midnight together. Spreading them across the hour is the difference between a busy few minutes and a spike that makes everything slow.
The engine shares itself between tenants
Worth knowing on a multi-tenant installation. Work is interleaved between tenants in turn rather than processed in whatever order the query returned, with an optional per-tenant cap per cycle.
So one customer with an enormous backlog cannot starve everybody else — which is exactly what happens without it.
Worked example
An organisation sets its reminder task hourly with a window of eight to six, its reporting task daily overnight, and staggers three heavy tasks across the small hours rather than all at midnight. A new task was capped at five runs while being watched.
Recommendations
- The longest frequency that meets the need.
- A window on anything that contacts a person.
- Cap new tasks while you watch them.
- Stagger heavy tasks rather than stacking them at midnight.