Schedule tasks
Schedule an agent to fire automatically on a cron expression: every Monday at 09:00, every hour, or any standard 5-field schedule.
In the UI
In the UI
-
Open Triggers under your project in the sidebar.
-
Click New trigger and choose Cron.
-
Pick the agent to run, type the prompt it should receive each fire, and set the schedule (5-field cron).
-
Optionally set a timezone (defaults to UTC).
-
Click Create. The trigger is enabled immediately.
Programmatically
Create a cron trigger
ren triggers create \ --project-id prj_abc123 \ --project-agent-id pagt_abc123 \ --input-message "Summarize this week's activity" \ --schedule "0 9 * * MON" \ --timezone "America/New_York"List triggers in a project
ren triggers list --project-id prj_abc123Update a trigger (change schedule, prompt, or toggle enabled)
ren triggers update trg_abc123 \ --project-id prj_abc123 \ --schedule "0 */2 * * *" \ --is-enabled falseArchive a trigger (stops the schedule permanently)
ren triggers archive trg_abc123 --project-id prj_abc123Create a cron trigger
curl -X POST https://api.renai.build/api/triggers \ -H "Authorization: Bearer $REN_PAT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "projectId": "prj_abc123", "projectAgentId": "pagt_abc123", "inputMessage": "Summarize this week'\''s activity", "schedule": "0 9 * * MON", "timezone": "America/New_York" }'List triggers
curl "https://api.renai.build/api/triggers?projectId=prj_abc123" \ -H "Authorization: Bearer $REN_PAT_TOKEN"Update a trigger
curl -X PATCH "https://api.renai.build/api/triggers/trg_abc123" \ -H "Authorization: Bearer $REN_PAT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "projectId": "prj_abc123", "schedule": "0 */2 * * *", "isEnabled": false }'Archive a trigger
curl -X POST "https://api.renai.build/api/triggers/trg_abc123/archive" \ -H "Authorization: Bearer $REN_PAT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "projectId": "prj_abc123" }'import { createRenClient, pat } from "@renai-labs/sdk"
const client = createRenClient({baseUrl: "https://api.renai.build",auth: pat(process.env.REN_PAT_TOKEN!),})
// Create a cron triggerconst { data: trigger, error } = await client.trigger.create({body: {projectId: "prj_abc123",projectAgentId: "pagt_abc123",inputMessage: "Summarize this week's activity",schedule: "0 9 \* \* MON",timezone: "America/New_York",},})if (error) throw errorconsole.log(trigger.id) // "trg_abc123"
// List triggersawait client.trigger.list({ query: { projectId: "prj_abc123" } })
// Update a triggerawait client.trigger.update({path: { triggerId: trigger.id },body: { projectId: "prj*abc123", schedule: "0 */2 \_ \* \*", isEnabled: false },})
// Archive a triggerawait client.trigger.archive({path: { triggerId: trigger.id },body: { projectId: "prj_abc123" },})The schedule uses standard 5-field cron syntax: minute hour day-of-month month day-of-week. Archiving a trigger stops it permanently.