Scheduled calls
A service asks to be called later: "POST /jobs/close on me, every day". At the hour named, the gateway makes that call through its own front door, with an identity, and records what answered.
Your service exposes an endpoint - it already exposes some. No library to embed, no protocol of ours, no broker to install.
Your first schedule
You need a route to your service (its id is in the route editor's address, /infra/routes/<id>), and a role that route lets in.
Choose who may call the API
Open Data plane, Scheduler (/data-plane/scheduler) and press Access. Pick the mode: None, Meerkat token or Cluster token (see Who may call it). An infrastructure administrator makes this choice.
Create the token, with Meerkat token
In the Access drawer, Create a token opens Infra, Access tokens on its Internal filter. Press New internal token, name it after the service that will hold it, choose the perimeter Scheduled calls only, and press Create. The token is shown once: copy it into the service's secret, as MEERKAT_TOKEN below.
Create the schedule, from the service
From a pod of the cluster, on the internal plane:
curl -X POST http://meerkat:7070/api/schedules \
-H "Authorization: Bearer $MEERKAT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "orders hourly close",
"routeId": "orders-api",
"path": "/jobs/close",
"roles": ["orders_batch"],
"every": "PT1H"
}'
The answer is the schedule, with the id every other call takes:
HTTP/1.1 201 Created
Content-Type: application/json
{"id": "sch_83b4f3a9c1d24e6f9a0b7c5d2e1f4a38", "name": "orders hourly close",
"routeId": "orders-api", "route": "Orders API", "roles": ["orders_batch"],
"method": "POST", "path": "/jobs/close", "every": "PT1H", "paused": false, ...}
Check it on the Scheduler screen
The schedule appears at once on Data plane, Scheduler. Open it and press Run now: the call goes out, and the drawer's runs say how it ended, with what answered. A 403 there means the route does not let orders_batch in.
What the operator sees
Data plane, Scheduler lists everything scheduled, filtered by tenant and service, updated live: a run starting, advancing and finishing appears without refreshing anything. The actions there are the ones wanted at two in the morning: pause (and resume), bring the next turn forward, cancel the run in flight, remove - and write what a schedule is for when its service did not say. There is no button to create one or change what it calls, by decision: a schedule belongs to the service that needs it, which writes it through the API, on the internal plane, from its own screens.

One row per schedule, sorted by name, so a row stays where it is while it runs: its name and what it is for, When, Next run and Last run. A bar along the bottom of each row is its state: a quiet track while nothing runs, moving while a call waits for its answer, filling with the progress the service reports, and running backwards in red for a lost run waiting to be sent again. While it runs, the line under the name says in words where the run stands, and Last run reads running and since when: the previous result would contradict the bar. It is the first of the drawer's runs meanwhile, and the column shows the new one when the run ends. What it calls - method, path and route - is in its drawer, with the roles it calls with and Created by, the caller that wrote it. The drawer opens on its description, which an operator writes there when the service gave none. API explains the calls a service makes, Access decides who may make them. Deleting a schedule asks for its name, typed: the service that wrote it is never told, it is simply not called again.
A run in flight says where it stands - calling, waiting for the answer, accepted, the service took the work, or lost, to be sent again - which attempt it is, and what the service last said about it ("7 233 / 9 882 records"), live, under the name and in its drawer. Its next turn reads "after this run": the close arms it, and "run now" waits for that. Cancel run, in the drawer's Run in flight, stops it: closed at once, the service told at its next report.
A schedule's drawer keeps every turn it ran: when it ended, how, what answered, which node made the call, which attempt it was. Running one again is Run now: the same call, with today's payload.
A delayed action that has gone reads "finished" and keeps its result on screen until the sweep. A switch hides them when a service posts enough of them to bury the rest, and root chooses beside it how long they are kept.
The hours are written in the operator's own zone - the one on their profile, set once and read by both planes, UTC when they chose none: "2:24 AM" means nothing until it says whose 2:24 it is.
An API button opens, in the same drawer, the mechanism and the API: the commands and the payload already filled in with this installation's address, because the screen creates nothing and the next step is a call the service makes itself.
A schedule's drawer keeps, folded away, the payload that recreates it: the fields a row cannot show - the body sent, the three settings - and a worked example for whoever has to write the next one.
The Metadata filter there takes what the API takes - station=42, or station=~^st- - because an operator looking for one schedule in a fleet looks for it by what the service wrote on it.
Creating a schedule is not among them, deliberately: whoever writes a schedule chooses the roles its calls carry, and that is the service's business, decided by who may call the internal plane - not a form any administrator can fill in. The console's plane refuses it too, in as many words: writing a schedule belongs to the service, on the internal plane.
It runs as meerkat, carrying the roles the schedule asks for
That is the whole security model, and it fits in a sentence: a schedule reaches exactly what its roles reach.
There is no account behind a scheduled call. The schedule says which roles its call must carry (roles, or role when there is only one), the gateway makes the call under the name meerkat holding them, and everything standing in front of the service reads them as it reads anybody's: the predicates, the filters, the route's rule, the per-endpoint rules, the tenant's hours. A schedule asking for the wrong role is not a hole: it is a schedule that fails. At each turn the 403 is tried again twice, since it can be a moment (see Which failures are tried again); after the third attempt the turn closes as failed, and the console keeps the sentence that says so. The next turn does the same, until the role is fixed.
{ "role": "station_fetch", "routeId": "stations-api", "path": "/fetch/station" }
The roles asked for go through the catalogue's hierarchy, exactly as a session's do: asking for a parent role grants what it implies.
No service account to create, so no rights to keep up to date for ever. What bounds a schedule is who may write one, which the internal plane's access decides: no credential, a Meerkat token or the pod's own ServiceAccount token, then everyone or only the services listed. Whoever may write a schedule may ask for any role, so that list is the boundary.
If you do want to know whose a schedule is, file it in the metadata: "metadata": { "owner": "stations-svc" } is a key like any other, and one you search on.
When the endpoint being called is protected
Closed by the route's rule, or by an endpoint rule: nothing to put in the schedule but roles. The service receives the identity forwarded the way it is for a human - as headers, as REMOTE_USER or as a signed JWT, according to what the route declares. A wrong role gives a 403 the console shows in as many words, not a hole.
Closed by a secret the service expects itself - a key of its own, a third party: that is what headers is for, with a vault reference for a value. The secret is read only at the moment of the call: neither the database, nor the API, nor the console sees it.
At least once
A call can succeed at your end and fail on the way back, and a gateway can stop in the middle of one. Every call therefore carries a run identifier, the same on every attempt:
POST /jobs/close
Meerkat-Job: sch_83b4f3a9...
Meerkat-Job-Run: GvbDqbNG__YTOY00
Meerkat-Job-Attempt: 1
Your service must ignore an identifier it has already seen. Exactly-once would need a transaction shared between the gateway and your service, so a shared database: precisely the dependency this product does without.
When is the same run sent twice? Only when nobody can know whether you got it:
| What happened | What the gateway does |
|---|---|
| You answered, whatever the status | The run closes on that answer. That same call is never sent again. A few failures get another attempt, as a new run with a new identifier - see "Which failures are tried again" |
You answered 202 |
The work is yours. Not sent again, whatever happens to the gateway - unless you go quiet for a lease and the schedule asks for it (retryLost, see "When the service goes quiet") |
| The instance making the call stopped before your answer | Another instance sends it again, same run identifier, Meerkat-Job-Attempt one higher |
The last line has three bounds. Three attempts at most, so that a call that brings an instance down does not bring every instance down in turn. Never later than catchUp, the same rule as a turn missed while the gateway was down. And how soon: at once when the gateway stopped cleanly - a rolling deployment hands its calls in flight over as it leaves - and when the lease runs out, five minutes, when it died.
Long work answers 202
The call starts the work; it does not wait for it. A service answering 202 Accepted keeps the run open and reports on it until it closes it. That is what makes a three-hour job expressible without a three-hour HTTP request. Any other answer closes the run there and then: 2xx succeeded, the rest failed, with the status and what the answer said - an error page is cut down to the sentence a human reads on it, never to its doctype.

The report
PATCH /api/schedules/{id}/run
Content-Type: application/json
{"run": "GvbDqbNG__YTOY00", "progress": 73, "detail": "7 233 / 9 882 records"}
and at the end {"run": "...", "state": "done", "detail": "9 882 records"}.
| Field | |
|---|---|
run |
Required: the Meerkat-Job-Run the call carried (or that header on the report) |
state |
running, or nothing, while it works; done or failed to close the run |
progress |
0 to 100: the bar on the Scheduler screen |
detail |
Your own words. While it runs, shown live under the schedule's name and in its drawer (200 characters kept); on the closing report, kept in the history |
retryIn |
With failed only: call me back then, an ISO duration - see "When the service cannot run it yet" |
With which token? None. The run identifier is the proof - 96 random bits, given to your service alone by the call - so a report is taken whatever the internal plane's access mode. Asking for the mode's credential as well broke every run in flight the day the mode changed.
The answer to a report
The answer is also the gateway's word to your job, and a long job hears it at its next report:
| Status | Meaning | What your service does |
|---|---|---|
204 |
Recorded | Carry on - or, after done/failed, nothing more to do |
410 Gone |
Stop. The run is already closed on the gateway's side | Stop the work and report nothing more. The body says why: {"stop": "paused", "error": "..."} |
409 |
A run identifier this schedule never gave out | A bug: check which Meerkat-Job-Run you are reporting on |
422 |
Something in the report cannot be (progress past 100, retryIn on done) |
Fix the report |
The stop of a 410:
stop |
Why |
|---|---|
paused |
The schedule was paused while the run went on. The run is closed as cancelled; the next turn comes after a resume |
cancelled |
Somebody cancelled the run - the console, an agent, or a DELETE /api/schedules/{id}/run |
deleted |
The schedule no longer exists |
lost |
The run was closed as lost: you were silent past the lease, and it was not sent again |
closed |
The run had already ended - a closing report sent twice |
Stopping a run
Three ways, all heard by the service at its next report, which a long job sends anyway to keep its lease:
- Pause the schedule. The run goes on until the service reports: that report is answered
410with"stop": "paused", and the run closes ascancelled. A closing report (done,failed) on a paused schedule is still taken: the work is done, and throwing its result away would help nobody. Nothing more goes out until the schedule is resumed; a turn owed in the meantime goes out on the resume, withincatchUp. - Cancel the run: the Cancel run button in the drawer's Run in flight, the agent's
cancel_schedule_run, orDELETE /api/schedules/{id}/run(on the console's plane and on the internal one, so a service can stop its own run from its own screens). The run is closed at once ascancelled, the history says by whom, and the next turn is armed at the schedule's own time. Any report on that run, closing ones included, then gets410with"stop": "cancelled". - Delete the schedule: its next report gets
410with"stop": "deleted".
A call still waiting for its answer when it is cancelled is let go the same way: whatever comes back for it no longer matches the run.
To stop many at once, pause them by what you filed them under - the list's own filter, answering the schedules it matched as they now stand:
curl -X POST "http://meerkat:7070/api/schedules/pause?meta.svc=stations&meta.job=import" -H "$AUTH"
curl -X POST "http://meerkat:7070/api/schedules/resume?meta.svc=stations&meta.job=import" -H "$AUTH"
A call naming nothing - no meta.*, no tenant, no route - is refused: every schedule of the gateway at once is not one call's to decide.
When the service goes quiet
Every report renews the lease. Say nothing for five minutes and the run is lost: closed rather than left running for ever, and by default not sent again - the 202 said the work was yours, and only your service knows whether picking it up again is safe.
When it is safe - the service keeps its own progress and resumes from it - the schedule says so with retryLost, an ISO duration from one minute to one day:
{ "name": "oscar import fr", "every": "P1D", "retryLost": "PT1M", ... }
A service restarted in the middle of its job (a pod killed, a deployment) then loses the lease, and the gateway waits retryLost before sending the same run again: same Meerkat-Job-Run, Meerkat-Job-Attempt one higher, so the service recognises the run it was working on and resumes it. Meanwhile the console shows the run lost, to be sent again, and a report arriving in the meantime takes it back - the service was slow, not gone. Bounded like every attempt of a turn: three attempts at most (those before the 202 count), never on a paused schedule, never later than catchUp. When none is left, the run closes as lost and the history says why it was not sent again.
When the service is down
Nothing special happens, and that is the point: the call comes in by the front door, so it gets what a browser would have got. The gateway answers 502 for a service it cannot reach and 504 for one that does not answer in time, the run closes as failed, and the console keeps the sentence: "502 Bad Gateway: Unavailable This application is not responding".
- Three attempts, then the next turn. A failure worth trying again - see below - is tried again 30 seconds later, then 2 minutes later, and that is all. A service down all night costs three calls and then one per cadence, never one per second.
- No stuck run. The failure closes the turn there and then; the lease has nothing to reclaim, and the schedule is not held by a turn that will never come back.
- No contagion. A schedule that fails suspends no other, and does not suspend itself: pausing is an operator's decision. Each call is made on its own, too: a service that takes its time holds its own call, and nobody else's.
- A call that does not answer within the schedule's
timeoutis closed by us, and says so - "no answer within the 3s this schedule allows" - rather than letting it read as a service breaking when it is us who stopped waiting.
So a service that is down reads as a service that is down, and is fixed by turning it back on: nothing to replay, nothing to unblock.
Which failures are tried again
Behind a scheduled call there is an internal service, so a handful of answers are usually a moment rather than a verdict - a gateway that has just restarted, a version still rolling out:
| The answer | What happens |
|---|---|
401, 403, 404 |
tried again: the account is not known yet, the roles are not loaded, the route of a version still coming up is not there |
502, 503, 504, or no answer within the timeout |
tried again: nobody answered |
anything else, 500 first of all |
not tried again. That is the service SAYING something, and a bug at the far end is handled at the far end |
lost - it took the work with a 202 and went quiet |
not tried again: it has the work - unless the schedule says retryLost, and then it is the same run that is sent again |
An attempt that is tried again is a new run, with its own identifier: a service that deduplicates would have thrown away a call it never acted on. It is the same turn, so the attempts count together - three at most - and the history links them.
Two bounds beyond the three attempts: the schedule's catchUp, because a call only worth making on time is not worth making twenty minutes later, and the growing wait between attempts, because what is being waited for is a service coming back up.
When the service cannot run it yet
Nothing is broken, the work simply cannot be done now: the extract is not published, a dependency has not answered. The service knows why, and it knows when to come back - so it says so, rather than leaving the gateway to guess:
HTTP/1.1 424 Failed Dependency
Retry-After: 600
the daily extract is not published yet
The turn comes back then. 424 and not 503: a 503 says "I am down", which is what trying again already covers, while 424 says "I am fine, what I needed is not" - which only the service can know.
For a job accepted with a 202, the same answer rides on the report:
{"run": "GvbDqbNG__YTOY00", "state": "failed",
"detail": "the daily extract is not published yet", "retryIn": "PT10M"}
Either way, the reason stays on the run that gave it, and the turn that follows points back at it: the history reads "not published yet, put off to 10:15, done" as one chain.
Three bounds, and they are clamped rather than refused - a reasonable answer should never cost a turn: a minute at the soonest, a day at the furthest, and five in a row at most. A service that has asked five times is not waiting for a moment, it is broken: the turn is let go, the schedule's own cadence takes over, and the screen says why.
The API, and where it lives
On the internal plane, port 7070: neither the port your applications answer on, nor the console's. A scheduled call is a service the gateway provides to the backends behind it: no browser calls it. A backend does, from inside the cluster, by the gateway's internal name.
http://meerkat:7070/api/schedules
In HTTPS on 7443 once a certificate is placed on the internal plane; the scheduler's page gives the address, as the runtime names it.
That port is never put behind an ingress, and a browser session is refused there. Inside the cluster is a place, not a credential - any pod can reach a ClusterIP - so what a caller must present is a decision, and it is yours: see Who may call it.
POST /api/schedules |
create - the id comes back in the answer |
GET /api/schedules |
the list, filtered |
GET /api/schedules/{id} |
one of them |
PUT /api/schedules/{id} |
change it |
DELETE /api/schedules/{id} |
remove |
POST /api/schedules/{id}/pause |
stop it firing - its run in flight is told to stop |
POST /api/schedules/{id}/resume |
let it fire again |
POST /api/schedules/{id}/run |
bring the next turn forward |
GET /api/schedules/{id}/runs |
what each turn did, newest first |
PATCH /api/schedules/{id}/run |
report on the run in flight - the answer may say stop |
DELETE /api/schedules/{id}/run |
cancel the run in flight |
POST /api/schedules/pause?meta.<key>=... |
pause every schedule the filter matches |
POST /api/schedules/resume?meta.<key>=... |
resume every schedule the filter matches |
Who may call it
What a service presents on this port is a setting: the Access button of the Scheduler screen, beside API, opens it in a drawer. An infrastructure administrator changes it; the Scheduler's other readers see it.

Here the Meerkat token mode, with one internal token let in. Create a token shows under that mode only, since the other two need none, and opens Access tokens on its Internal filter (below).
| Mode | The caller presents | It is known as |
|---|---|---|
| None | nothing | its token's name or its ServiceAccount when it sends one, otherwise the workload holding its address: apps/Deployment/reference-data on Kubernetes, the service or container on Docker and Swarm |
| Meerkat token | a token of perimeter schedules (below) |
the token's name |
| Cluster token | its pod's ServiceAccount token, which Kubernetes checks (TokenReview). Kubernetes only | namespace/serviceaccount |
# Cluster token: the pod sends the token Kubernetes mounted for it.
curl http://meerkat:7070/api/schedules \
-H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)"
Then who: everyone, or only the callers listed, compared with the name the mode gives. A caller nobody could identify is refused as soon as there is a list, and accepted under everyone. Every refusal says what is missing and who is allowed. A credential that is sent is checked in every mode: a revoked token is refused, it does not become an anonymous caller.
ROLE_ADMIN included, on any route.Each schedule records who created it and how that was known - a token, a ServiceAccount, a workload deduced from its address, or nobody, with the address it came from. Its drawer names the creator; the audit trail also says how it was known.
A new installation starts in None. One upgraded while it held a schedules token keeps Meerkat token, so an upgrade opens nothing. The JWKS and the discovery document on the same port stay open in every mode.
On Kubernetes the chart grants what this needs: create on TokenReviews and list on ServiceAccounts (rbac.internalCallers), and get on ReplicaSets where it already reads the pods (rbac.watch, rbac.watchNamespaces). A pod in a namespace the gateway does not read is unidentified.
What the console does, and does not
The console reads the same schedules, on its own plane, and acts on those that exist: pause, resume, run now, cancel a run, delete. It creates none, and changes one field: the description, for a schedule whose service never said what it is for. There is no button for the rest, and the control plane refuses POST, PUT and the run report from a console session or an operator's token, naming the internal plane in its answer. A schedule is written by the service that needs it.
:9090). A service token still calling there keeps working, for the time it takes to move its backend, and the gateway writes once in its log which token did and where its door is now. Only the address changes: same token, same paths.The token
A token whose perimeter is schedules, minted on the console (Infra, Access tokens, Internal filter, New internal token, named after the service that holds it or global, perimeter Scheduled calls only; Create a token in the Access drawer leads there) and used on the internal plane. It is what the Meerkat token mode asks for, and what None reads when it is sent. It opens this API and nothing else - not the configuration, not the accounts, not the routes, and nothing at all on the console's port. Narrow on purpose: it lives in a deployment manifest, often in another team's repository, and it is the one nobody remembers to rotate.
What the calls may reach is not decided here: it is the schedule's own roles field. So one backend keeps one token and schedules for as many different endpoints as it serves - a token per endpoint would be one more secret to rotate, for a question the schedule already answers.
The ids are ours
POST creates and hands back the id; everything else takes it. Would rather not keep it? File the schedule under your own metadata and ask for it back that way - which is what a reconciliation loop does.
A schedule names a route, never a URL: a service that moves keeps its schedules.
{
"name": "station 42, hourly poll",
"description": "Fetches the hourly readings of station 42",
"roles": ["station_fetch"],
"method": "POST",
"routeId": "stations-api",
"path": "/fetch/station",
"every": "PT1H",
"headers": { "X-Action": "fetch", "X-Api-Key": "${stations-key}" },
"body": { "kind": "poll", "region": "west", "station": "42" },
"metadata": { "svc": "stations", "station": "42", "env": "prod" }
}
The verb, the headers, the body
method is the verb of the outgoing call, the one the gateway will send to the service: POST by default, with POST, PUT, PATCH and DELETE accepted. GET is refused, and the message says why: a scheduled call is an action, and a schedule that only reads is a schedule whose answer nobody looks at.
headers carries what the service asked to be told, beyond what the gateway writes by itself. Ten at most. A value may be a vault reference - ${stations-key} or $stations-key - resolved at the moment of the call, against the application's scope or the tenant's when the schedule has one: the row keeps the reference, so the secret appears neither in this API's answers nor in the console. A name the vault does not hold goes out verbatim, $typo, rather than becoming an empty header, which would fail in a far more confusing way.
Five names are refused as the schedule is written, each with its reason: Authorization, because the gateway writes it and it is the identity of the account the schedule runs as; Host, because the route decides it; Meerkat-Job, Meerkat-Job-Run and Meerkat-Job-Attempt, because the gateway writes them and they are how your service recognises a turn it has already seen.
body is JSON. An object or an array goes out as it stands, with Content-Type: application/json. A JSON string goes out as its content, text/plain; charset=utf-8 by default: that is how a form, an XML document or a line of text is sent from a field that is otherwise JSON. An explicit contentType always wins, since it is the one the service asked for.
What it is for: the description
The name identifies a schedule; description says what it does, in a sentence or two (500 characters at most). Optional, and shown under the name in the console. A service that leaves it out can have it written by an operator, in the schedule's drawer, so a PUT without a description keeps the one already there: a service that rewrites its schedules at every start does not wipe it.
Metadata: the service's own filing system
metadata is an open object, yours: any keys you like, text values, which Meerkat stores and matches on without ever trying to know what they mean. It is what makes one token enough - it is the metadata that tells one schedule from a thousand.
You ask for them back the same way:
# one station
curl "http://meerkat:7070/api/schedules?meta.station=42" -H "$AUTH"
# two conditions, both required
curl "http://meerkat:7070/api/schedules?meta.kind=poll&meta.region=west" -H "$AUTH"
# an expression, for a fleet
curl "http://meerkat:7070/api/schedules?meta.station=~^[0-9]{1,2}$" -H "$AUTH"
meta.<key>=<value> matches exactly, meta.<key>=~<expression> matches by regular expression. Two more filters, on what the gateway knows by itself: tenant and route. One that does not compile is a refusal saying so, never an empty list that would read as "there is nothing".
Twenty keys at most per schedule: it is a filing system, not a place to keep your data.
A cadence, a calendar, or one date
A schedule says when one of three ways, never two.
every, a cadence: an ISO 8601 duration - PT30M, PT6H, P1D - counted from the end of the last run. The shortest is one minute. It is what "every six hours" wants, and it is what keeps a slow job from firing again the instant it returns.
cron, a calendar: the five standard fields, with lists, ranges, steps, the names MON-SUN and JAN-DEC, and the shortcuts @hourly, @daily, @weekly, @monthly, @yearly.
{
"name": "monday report",
"routeId": "orders-api",
"method": "POST",
"path": "/jobs/report",
"cron": "0 3 * * MON",
"timezone": "Europe/Paris"
}
at, a single date: one RFC 3339 moment, with its offset - 2026-10-03T04:00:00Z, 2026-10-03T06:00:00+02:00. The call goes out then, once, and the schedule is finished: nothing is armed after it.
{
"name": "cart 4471, reminder",
"routeId": "orders-api",
"path": "/jobs/remind",
"at": "2026-10-03T04:00:00Z",
"metadata": { "cart": "4471" }
}
That is the delayed action: the trigger is something that happened - a basket left behind, a booking made, a document deposited - rather than anything on a calendar. Your service handles what happened, posts the date it wants to be called back at, and forgets about it.
A few things follow from "once":
- The date carries its own offset, so
timezonemeans nothing beside it and is refused.startAtis refused too: it places the first turn of something that repeats, and a single date is its own first turn. - A date already past is not an error: the call goes out at once if
catchUpstill allows it, and is dropped otherwise - exactly like a turn missed while the gateway was down. - The row stays once it has gone, with its result, so somebody can see that it went out. It is swept after a retention root chooses on the Scheduler screen, a month by default. A schedule that repeats is never swept.
- Moving its date with a
PUTmoves the turn: that is how a delayed action is pushed back, and how a finished one is given another date.
Take the calendar for "every Monday at three" or "the first of the month": a cadence cannot say it, and it drifts a little every turn.
Take the cadence for a period. A cron expresses none: its fields are positions in a calendar, not steps in a sequence.
0 */7 * * * 00:00, 07:00, 14:00, 21:00, then midnight -> a 3-hour gap
*/45 * * * * 0, 45, then 60, then 105 -> a 15-minute gap
*/20 * * * * 0, 20, 40, 60 -> this one lands right
*/n is a period only when n divides 60 or 24. "Every 90 minutes" is written PT90M, and no other way. A cadence also has no zone to choose and no clock-change night to cross, and fifty schedules on PT1H spread themselves out where fifty on 0 * * * * all go out on the same second.
As in every crontab, when both day fields are restricted a day matching one or the other is a match: 0 0 1 * MON is the first of the month and every Monday.
A calendar is read somewhere
timezone is an IANA name - Europe/Paris - and UTC when you say nothing: "three in the morning" means three UTC until you write down where. A zone this gateway does not know is refused as it is written, rather than quietly falling back to UTC.
The two nights that matter are handled: the hour that does not exist in spring moves the turn, the one that happens twice in autumn fires once. A cadence ignores the field.
Three settings that avoid three surprises
| Setting | What it prevents |
|---|---|
overlap, skip and nothing else |
A slow job that has not come back: the next turn does not go out. Nothing more is owed while a run is in flight, and its close arms the next turn, counted from then - so a slow job never finds one waiting in the past the instant it returns. run - a second call alongside the first - is refused: a schedule holds one run in flight |
catchUp, in seconds |
A gateway down all night firing twelve turns on waking. Zero means "run it whenever you can". It also bounds how late a call cut short by a stopping gateway is sent again, and whether a delayed action nobody was up for still goes out |
timeout |
A call that never answers. It bounds the answer, not the work: that is what the 202 is for. Two minutes at most (PT2M) |
What each turn leaves behind
The schedule itself keeps the last result, which is what a list shows. Every turn that ended is also kept on its own, and that is what answers "since when is this failing", "did last night's close run" and "what did it answer":
curl "http://meerkat:7070/api/schedules/sch_9f2c/runs" -H "$AUTH"
[
{
"id": "run-17906f3c9d2a4e10-9f2c11",
"runId": "GvbDqbNG__YTOY00",
"attempt": 1,
"node": "meerkat-7d9c",
"startedAt": 1790770190,
"endedAt": 1790770191,
"state": "done",
"status": 200,
"detail": "200 OK"
}
]
Five ways a turn ends, and the difference matters:
done |
the service answered 2xx |
failed |
it answered something else, or nobody answered within the timeout |
lost |
it took the work with a 202 and then went quiet past the lease |
cancelled |
somebody stopped it: cancelled, or paused while it ran |
dropped |
the turn never went out: it came round later than catchUp allows |
attempt says which attempt ended the turn: 2 means a gateway stopped before the answer and another sent the same call again. cause and ofRun are the chain - an ordinary turn says nothing, a replay names the run it continues.
Running a turn again
A turn that was dropped, or that failed for a reason since fixed, is asked for again by name:
curl -X POST "http://meerkat:7070/api/schedules/sch_9f2c/run" -H "$AUTH" \
-H "Content-Type: application/json" \
-d '{"replayOf":"run-17906f3c9d2a4e10-9f2c11"}'
It goes out as a new run, with a new identifier and today's payload - the schedule as it stands now, not as it stood that night. What it replays is written in the history, so the two read as one chain. Without a body, the same call is the plain "run now".
The history is swept on the same retention as a finished delayed action - a month by default, root's to change - and goes with the schedule when it is deleted.
When it looks, and in a cluster
There is no tick. The gateway sleeps until the next thing owed and wakes on the second. Writing a schedule, pausing it, bringing it forward or closing a run wakes it at once; a backstop covers the rest, once a minute.
Several gateway instances share one table and nothing takes a lock: taking a turn is a conditional UPDATE, so two instances at the same instant produce one winner. The calls spread over the instances, several at a time on each - a slow service holds its own call and nobody else's.
What a cluster really adds is the lease: a run nobody says anything about for five minutes is settled by whichever gateway sees it first: sent again, set to wait for retryLost, or closed as lost.
While a run is in flight nothing more is owed: "run now" answers 409, and the run's close arms the next turn.
What it is not
A message queue. No fan-out to several consumers, no acknowledgement, no dead letters: one schedule, one call, at least once. If you need the other thing, you need a broker.
POST /api/schedules/{id}/run on the internal plane - it answers 409 while the previous run is still in flight. The gateway keeps the identity, the containment and the record; your cluster keeps the calendar. Meerkat needs no rights on your cluster for that.