Schedules and triggers
A script can run without anyone clicking Run, on a schedule or on a trigger. Schedules and triggers are a script’s automations. A trigger is one of two kinds:
| Kind | Starts a run when | The run’s via |
|---|---|---|
| Event trigger | Something happens in the workspace, such as a run failing. | trigger |
| Webhook trigger | Another service, a form or your code calls its URL. | webhook |
Reminix marks a schedule’s run schedule. The run acts as the person who
created the schedule or trigger and has that person’s access. It counts
toward the workspace’s runs like any other.
Schedules
Section titled “Schedules”On the script’s page, choose Schedules → Add schedule. Give it a name and say when to run: every hour, every day at 9:00, weekdays at 9:00, every Monday, or any 5-field cron. Then choose a timezone, and fill in the inputs with the script’s own form. If your workspace has more than one environment, choose the one the schedule runs in. The form starts on the default. A schedule’s runs must be at least 5 minutes apart. They follow the timezone’s clock, including daylight saving time.
For example, the monthly-report script reports on last month when it
gets no month, so its schedule runs at 8:00 on the 1st of every month
with no inputs. From your code or the CLI:
import { createClient } from "@reminix/sdk";
const reminix = createClient({ token: process.env.REMINIX_TOKEN!, workspace: "acme",});
const schedule = await reminix.schedules.create("monthly-report", { name: "First of the month", cron: "0 8 1 * *", timezone: "Europe/London",});console.log(schedule);import os
from reminix import Reminix
reminix = Reminix(token=os.environ["REMINIX_TOKEN"], workspace="acme")
schedule = reminix.schedules.create( "monthly-report", name="First of the month", cron="0 8 1 * *", timezone="Europe/London",)print(schedule)reminix schedules create monthly-report --name "First of the month" \ --cron "0 8 1 * *" --timezone Europe/Londoncurl -X POST https://api.reminix.com/v1/scripts/monthly-report/schedules \ -H "Authorization: Bearer $REMINIX_TOKEN" -H "X-Workspace: acme" \ -H "Content-Type: application/json" \ -d '{ "name": "First of the month", "cron": "0 8 1 * *", "timezone": "Europe/London" }'If you don’t give an environment, the schedule runs in the
workspace’s default.
A schedule doesn’t catch up. Say an outage kept Reminix from starting it for a few hours. Afterwards, the schedule runs once and carries on from its next time. It doesn’t run once for every time it missed.
Event triggers
Section titled “Event triggers”Choose Triggers → Add trigger, then When something happens in the
workspace. Pick the event: any workspace event,
such as another script’s run.succeeded or run.failed,
script.published, or a member joining. You can also make it run only
when a field of the event equals a value. Then set the inputs. A value
written as {{event.data.<field>}} comes from the event. For example,
this trigger on the alert-on-failure script posts to Slack when the
nightly sync fails:
{ "type": "event", "name": "Nightly sync failed", "event": "run.failed", "filter": { "script.slug": "nightly-sync" }, "inputs": { "runId": "{{event.data.runId}}", "error": "{{event.data.error}}" }}An event trigger runs in the environment you choose for it, no matter which
environment the event came from. To react only to production runs,
filter on "environment": "production".
An event trigger starts its run within about a minute of the event, and at most once. If that run can’t start, Reminix doesn’t try it again. When one triggered run’s end triggers another, and so on, Reminix stops the chain after 3 runs. A script can never trigger itself forever.
An event trigger acts as the person who created it, so it reacts only to
events about scripts that person can see. For example, a trigger on
every run.failed never starts for a script shared only with teams its
creator isn’t in. A filter can’t name such a script either.
Webhook triggers
Section titled “Webhook triggers”A webhook trigger gives the script a URL. A call to the URL starts a run, as the person who created the trigger. Stripe, GitHub, an HTML form, Zapier or your own code can call it. This is the other way round from the workspace’s webhooks, which send events out.
Create one
Section titled “Create one”On the script’s page, choose Triggers → Add trigger, then When something calls its webhook URL. Give it a name, and choose:
- Inputs: where each run’s inputs come from (below).
- Locked inputs: saved inputs that a call can’t change.
- Signature: a Stripe or GitHub signature check, with the secret the provider gave you.
- Environment: the environment its runs use.
Reminix then shows the trigger’s URL and its secret. Copy them now. Reminix keeps only a hash of the secret, so it can’t show them again. If you lose the URL, rotate the secret to get a new one.
Only the script’s owner, or a workspace owner or admin, can create a
webhook trigger. From the API, type: "webhook" creates one:
curl -X POST https://api.reminix.com/v1/scripts/refund-customer/triggers \ -H "Authorization: Bearer $REMINIX_TOKEN" -H "X-Workspace: acme" \ -H "Content-Type: application/json" \ -d '{ "type": "webhook", "name": "Stripe dispute", "inputMode": "request", "signature": "stripe", "signingSecret": "whsec_…" }'The answer carries url and secret, this once.
Call it
Section titled “Call it”Send a POST to the URL:
curl -X POST "$WEBHOOK_URL" \ -H "Content-Type: application/json" \ -d '{ "email": "jane@example.com" }'The URL contains the secret. Reminix’s hosting provider records the URL of every request in its logs, so where the caller can set headers, send the secret in a header instead. Use the URL without its last part:
curl -X POST https://api.reminix.com/webhooks/trg_6e4a… \ -H "Authorization: Bearer $WEBHOOK_SECRET" \ -H "Content-Type: application/json" \ -d '{ "email": "jane@example.com" }'Every call needs the secret, in the URL or the header. Reminix answers:
| Status | When | Body |
|---|---|---|
| 202 | The run started, or waits for approval. | { "runId": "run_…", "status": "running" } |
| 202 | The call repeats one from the last 24 hours (below). | { "runId": "run_…", "duplicate": true } |
| 400 | The body isn’t JSON or a form, or its inputs don’t fit the script. | What is wrong with the call. |
| 404 | The secret or signature is wrong, the trigger is off, or someone archived the script. | Not found, whichever it is. |
| 413 | The body is larger than 256 KB. | The body is larger than 256 KB. |
| 429 | A limit below, or the workspace has used its plan’s runs. | Which limit. |
No answer names the workspace, the script, the trigger or its creator.
Inputs
Section titled “Inputs”| Inputs | Each run’s inputs | For |
|---|---|---|
| Fixed inputs | The inputs saved on the trigger. Reminix ignores the body. This is the default. | A call that says “now”. |
| Inputs from the call | The body’s fields, by input name. Reminix refuses a field the script doesn’t declare. Saved inputs fill the gaps, and a locked input keeps its saved value. | curl, forms and Zapier. |
| The whole request | One input, request, with the call’s body and headers. The script must declare request, of type object. Saved inputs fill the script’s others. |
Stripe and GitHub. |
A body can be JSON or a form (application/x-www-form-urlencoded). In The whole request, headers holds only content-type and the
sender’s event and delivery ids: stripe-event-id, x-github-event,
x-github-delivery and idempotency-key, when the call has them.
Check Stripe’s or GitHub’s signature
Section titled “Check Stripe’s or GitHub’s signature”With a signature check, a call also needs the provider’s valid signature, made over the raw body with the secret you gave the trigger.
| Signature | Header | Signing secret |
|---|---|---|
| Stripe | Stripe-Signature |
The endpoint’s signing secret (whsec_…), in Stripe’s dashboard. |
| GitHub | X-Hub-Signature-256 |
The secret you set on the GitHub webhook. |
Reminix refuses a Stripe signature older than 5 minutes. Reminix stores the signing secret encrypted and never shows it again. Changing the check needs the secret again.
For example, to refund when a Stripe dispute opens, add an endpoint in
Stripe with the trigger’s URL and the charge.dispute.created event.
Create the trigger with The whole request and a Stripe signature.
The script reads the event from its request input:
import jsonimport os
with open(os.environ["REMINIX_INPUTS_FILE"]) as f: inputs = json.load(f)
event = inputs["request"]["body"]dispute = event["data"]["object"]print(json.dumps({"dispute": dispute["id"], "charge": dispute["charge"]}))Its reminix.json declares the one input:
{ "command": "python dispute.py", "inputSchema": { "type": "object", "required": ["request"], "properties": { "request": { "type": "object" } } }}For GitHub, add a webhook in the repository’s settings with the
trigger’s URL, content type application/json and the same secret. The
event’s name is in request.headers["x-github-event"]:
import jsonimport os
with open(os.environ["REMINIX_INPUTS_FILE"]) as f: request = json.load(f)["request"]
if request["headers"].get("x-github-event") == "push": print(json.dumps({"ref": request["body"]["ref"]}))Repeated calls
Section titled “Repeated calls”Providers send a call again when they don’t hear back. Reminix starts one run per delivery, by the delivery’s id:
| Caller | Delivery id |
|---|---|
| Stripe check | The event’s id. |
| GitHub check | The X-GitHub-Delivery header. |
| Anyone | An Idempotency-Key header. |
A repeat within 24 hours answers with the first run. A call without a delivery id always starts a run. GitHub can redeliver a call from more than 24 hours ago, and Reminix runs it again.
Limits
Section titled “Limits”| Limit | Value |
|---|---|
| Body | 256 KB |
| Calls to one trigger | 60 a minute |
| Refused calls from one address | 30 a minute |
| Runs webhook calls start in a workspace | 1,000 an hour |
Each call that starts a run counts toward the plan’s runs. If a trigger refuses 50 calls in an hour for a wrong secret or signature, Reminix turns it off. It emails the trigger’s creator and the workspace’s owners. Rotating the secret turns it back on.
Approvals
Section titled “Approvals”A webhook call comes from whoever holds the URL, so its run waits for a person wherever an agent’s run would. That’s when an owner or admin sets the script or its environment to Agents need approval or Every run needs approval. See Governance.
Rotate, recent calls and a public URL
Section titled “Rotate, recent calls and a public URL”Rotate secret on the trigger gives it a new secret and URL. The old ones stop working at once. Recent calls lists the last 20 calls: when, whether each started a run, repeated an earlier call or Reminix refused it, why, and the run. Reminix keeps calls for 30 days.
Treat the body as untrusted, as you would any request from the internet. Reminix keeps a run’s inputs, including a call’s request, for as long as the plan keeps runs.
A URL on a public page, such as an HTML form’s action, is open to
anyone who reads the page. What protects it is what you set: Fixed
inputs, or locked inputs for anything that matters, an approval on
the script, and the limits above.
Who can create them, and when they stop
Section titled “Who can create them, and when they stop”Only people can create schedules and triggers, in the app or with a personal access token:
| To | Who can |
|---|---|
| Create a schedule or trigger | Anyone who may run the script, as themselves. |
| Create one where every run needs approval | Only workspace owners and admins, because they’re the approvers. This applies to the script’s policy and the environment’s rule alike. |
| Change or delete one | Its creator, or a workspace owner or admin. |
| Create, rotate, change or delete a webhook trigger | The script’s owner, or a workspace owner or admin. |
An AI agent can list schedules and triggers but will ask you to create
one. For a webhook trigger, or a new secret, it files an approval
request that a workspace owner decides, and the URL goes to the owner.
The actions are trigger.webhook.create and
trigger.webhook.rotateSecret. A workspace
API key can’t create them, because there’s no person to act as.
- Reminix won’t delete an environment that a schedule or trigger runs in. Move the schedule or trigger to another environment first, or delete it.
- If its creator leaves the workspace or loses access to the script, Reminix disables the schedule or trigger, and its card says why. Enable it again, or recreate it, as someone who has access.
- If Reminix refuses a run before it starts, it skips that time, and the automation stays enabled. Its card shows the last time it skipped and why. For example, Reminix refuses a run when the script has no published version, when the inputs no longer fit a new version, or when the workspace has used its plan’s runs for the month.