M3-S4 — Scheduled jobs and escalation that repeats
Section titled “M3-S4 — Scheduled jobs and escalation that repeats”| Module | M3 — Advanced automation |
| After this session you can | Make the suite act on a timetable and keep after a late step until someone acts, without a person remembering. |
| Time | Facilitated: 55 min · On your own: 55 min |
| Before you start | M3-S3: Nour Hamdan waits at Job offer. Signed in as yourself; a private window for the test people. Your practice space has two working-hours schedules, Meridian working hours and Round the clock (testing). |
| Go deeper | Run on a schedule · Time limits and escalation · Date pointers in reaction criteria |
◆ Orientation (1 min) — Things that must happen on time
Section titled “◆ Orientation (1 min) — Things that must happen on time”Two of Meridian’s rules are about the clock. Jobs must close on their registration deadline (R-07); the tutorial planned a daily reaction for it, and the starter left it to you. An offer nobody answers must be chased, daily, three times at most (R-08). In ACD you put a time limit on a step and escalated once. Here you schedule work that has no event to start it, and an escalation that repeats and stops by itself.
▤ Concept (5 min) — Timers, filters that catch up, and repeating escalation
Section titled “▤ Concept (5 min) — Timers, filters that catch up, and repeating escalation”A scheduled job is a Timer reaction
Section titled “A scheduled job is a Timer reaction”A reaction with the event Timer has no record that sets it off. Its Interval type is One Time (once, at the Timer Date) or Repeat (on a Cron Expression, between an optional Start Date and End Date). At each run it goes through every record of its entity that matches its filter and runs its action on each. Large sets are worked through in batches, so a run over thousands of records takes a while. Because no person starts it, choose System as the Event Executor Type.
You met cron expressions in ACD: five values, minute, hour, day of month, month, day of week.
0 1 * * * is every day at 01:00; */2 * * * * is every two minutes, for testing only.
The filter is the design
Section titled “The filter is the design”The filter decides which records each run touches, so it carries three properties of a good job:
| Property | How the filter gives it | Jobs that close on their deadline |
|---|---|---|
| Catches up | Compare with “before today”, not “equal to today”, so a missed run is made good by the next one | Registration deadline before @today |
| Drops what it processed | Include a condition the action changes, so a record is never processed twice | Job status is Open (closing sets it to Closed) |
| Stays small | Narrow it to records that can need the action | Only jobs at Job publication |
For a date-only field, compare with @today, signed when you offset it: @today('-1d')
is yesterday. An unsigned amount such as @today('1d') is silently ignored. @now includes the
time of day, so it never equals a date-only value; keep it for date-time fields.
Escalation that repeats and stops
Section titled “Escalation that repeats and stops”A step’s Timing marks it Overdue when its limit passes; the limit can be a Fixed Value, a Field Value or an Expression, with a Fallback Value when the field or formula gives no number. On the Time Monitoring sub-tab of Reactions, an On Time Exceeded reaction for that step acts on it, and three settings make it repeat:
| Setting | Meaning (in seconds, counted against the step’s schedule) | Offer reminder |
|---|---|---|
| Wait for | How long after the deadline to act the first time | 0: at once |
| Repeat after | How long between repeats | 28,800: one working day of eight hours |
| Stop after | How many times to repeat after the first run | 2: three reminders in all |
The escalation stops by itself when the owner acts, because the step is no longer waiting.
Test with short values, then restore
Section titled “Test with short values, then restore”Nobody can wait a day in a lab. Test with Round the clock (testing), Minutes, a limit of 2, Repeat after 60, and a cron of every two minutes, then put the real values back and write down that you did. A test value left in production is a classic incident.
⛏ Lab (41 min) — Jobs that close themselves, and the offer reminder
Section titled “⛏ Lab (41 min) — Jobs that close themselves, and the offer reminder”Goal. A daily job closes every job whose deadline has passed; an unanswered offer reminds the contact person, repeats, and stops after three reminders.
Before you start. Signed in as yourself.
The scheduled job
- Open Jobs › Reactions › New Reaction › +. Name Close jobs past their deadline.
- Event Timer; Interval type Repeat; Cron Expression
*/2 * * * *(the test value). Event Executor Type System. - Filter: Registration deadline is less than
@today; Job status is Open; and the workflow step is Job publication. - Action Type Execute Workflow Step Action: step Job publication, action Finish. (The starter’s reaction Set the job status to Closed runs when publication finishes.) Confirm.
- Create a test job from All jobs: Test vacancy, deadline yesterday, other required fields as you like, and submit it. As Hala Mansour, approve it at Job review. It is now at Job publication and Open.
- Wait about two minutes and reload All jobs: Test vacancy is Closed. Its history shows the reaction’s run.
- Edit the reaction: set the Cron Expression back to
0 1 * * *.
The repeating reminder
- Edit Job Application › Workflows › Respond to job offer. Turn on Timing: Timing Schedule Round the clock (testing), Time Unit Minutes, Timing method Fixed Value, Value 2. Done, then save.
- Open Reactions › Time Monitoring › +. Name Remind contact person of an unanswered offer. Event On Time Exceeded; Choose Step Respond to job offer; Wait for 0; Repeat after 60; Stop after 2.
- Action Type Send Notification to User, Field, Contact person: title Offer not answered: {{name}}, with name mapped to Full name. Confirm.
- As Samir Khoury, open Nour Hamdan at Job offer, attach any file as Offered contract, and select Send job offer. The application moves to Respond to job offer.
- Wait about five minutes. As Hala Mansour, open the notifications: three reminders for Nour Hamdan, about a minute apart (the first run, then the two repeats Stop after counts), and no fourth.
- Restore the real values: Timing Schedule Meridian working hours, Time Unit Hours, Value 24 (three working days); Repeat after 28800.
Screenshot pending The Time Monitoring reaction for Respond to job offer with Wait for 0, Repeat after 60 and Stop after 2, before the real values are restored What to notice: the three settings make one reaction into a bounded series; the values here are the test ones and must be restored in step 13.
Check.
- Close jobs past their deadline is a Timer, Repeat, System, with the three-part filter, now on
0 1 * * *. - Test vacancy closed by itself within a few minutes.
- Respond to job offer has a time limit, and its On Time Exceeded reaction waits 0, repeats and stops after 2 repeats.
- Hala Mansour received three reminders for Nour Hamdan, not four.
- Both have their real values back.
Pass condition. A job past its deadline closed without anyone acting, the offer reminder ran exactly three times, and no test value is left.
If something goes wrong
| What you see | What to do |
|---|---|
| Test vacancy stays Open | The filter compares with @today unsigned or with @now; or the job is not at Job publication. Check its run count on the Reactions tab. |
| The job closed, but its status still says Open | The starter’s Set the job status to Closed reaction did not run; check it is active. |
| No reminder came | Nour Hamdan reached the step before Timing was turned on, or Contact person is empty. |
| Reminders keep coming | Stop after is empty. |
| Timing cannot be turned off later | A reaction uses it: remove or change the reaction first. |
Model answer
The scheduled job is a Timer reaction whose filter does the design work: “deadline before today” catches up after a missed night, “status Open” drops each job once it is closed, and “at Job publication” keeps every run small. Its action presses Finish for each matching job, and the starter’s own reaction then sets Closed. The reminder is one On Time Exceeded reaction that waits 0, repeats every working day and stops after three reminders; it stops earlier the moment the contact person records an answer. Both now run on their real values: 01:00 daily, and 24 working hours with a one-working-day repeat.
◇ Worked scenario (2 min) — The job that ran at every quarter hour
Section titled “◇ Worked scenario (2 min) — The job that ran at every quarter hour”A builder at another company writes a Timer that runs every 15 minutes over all Contracts,
filtered on End date equal to @today, and emails the owner. Complaints arrive: some owners
get 96 emails on the day; others get none after a weekend outage. Diagnose before reading on.
The 96 emails. Nothing in the filter changes when the email is sent, so every run that day matches the same contracts again: 4 runs an hour for 24 hours. Fix: add a marker the action sets (Expiry notice sent), filter on it being off, and send it with a chained update; or run once a day.
The missed notices. “Equal to today” only matches on the day itself; when the platform was down that day, the next day’s runs no longer match. Fix: “End date before or on today” plus the marker, so a missed day is caught up.
The cost. A run every 15 minutes over every contract works through the whole entity 96 times a day. Fix: a daily schedule at a quiet hour and a filter narrowed to active contracts.
The filter, not the schedule, is what makes a scheduled job correct.
✓ Practice (5 min) — Check your jobs
Section titled “✓ Practice (5 min) — Check your jobs”A daily Timer must archive draft requests older than 30 days. The Created on field is date-only. Which condition is right?
Check your answer
The correct answer is C. Open the explanation under each option to see why.
A nightly Timer sends each overdue invoice’s customer a reminder. Customers report getting one every night for weeks. What is the design flaw?
Check your answer
The correct answer is A. Open the explanation under each option to see why.
An escalation has Wait for 0, Repeat after 3,600 and Stop after 4 on a step timed against working hours. The owner acts 90 working minutes after the deadline. How many times did it run?
Check your answer
The correct answer is B. Open the explanation under each option to see why.
A Timer reaction set to 0 1 * * * runs its action once a day, on one record.
Check your answer
The correct answer is B (False). Open the explanation under each option to see why.
↺ Recap (1 min) — After Module 3
Section titled “↺ Recap (1 min) — After Module 3”You built a scheduled job whose filter catches up and never repeats itself, and an escalation that repeats and stops. After Module 3 you can implement advanced automation: chains across modules with failure handling, expressions, routes and owners worked out from the record, group decisions, scheduled jobs and repeating escalation.
Next. Module 4 is the first deep-code module: where the designer stops, you write a Function.