AI agent instructions
AI agent instructions
client.functions), or over HTTP (/functions/{function_id}/schedules).
The TypeScript SDK has setSchedule() and deleteSchedule(), which manage the Function’s schedules as a single one: setSchedule() replaces all of them with one schedule, and deleteSchedule() removes all of them. The Python SDK has the same pair as set_schedule() and delete_schedule().
Cron Expressions
Schedules use the AWS EventBridge cron format: six space-separated fields, minutes first. This is not the five-field Unix crontab format.minutes hours day-of-month month day-of-week year
- Exactly one of
day-of-monthandday-of-weekmust be?; the other must be a real value. - Schedules fire in UTC.
rate(...)expressions such asrate(1 hour)are also accepted.
A five-field expression such as
0 9 * * * is rejected.
Variables
Every run of a schedule receives that schedule’svariables. They must supply every parameter of run() that has no default value, and must not include names that run() does not declare. A Function without parameters can use an empty object.
Add, Update, and Remove Schedules
Setfunction_id / functionId to your function ID. The Python example adds a schedule next to any existing ones, changes it in place, lists the Function’s schedules, and then removes only the one it added. The TypeScript example replaces all of the Function’s schedules with one, reads it back, and deletes them:
Check Schedules
list_schedules() (GET /functions/{function_id}/schedules) returns:
schedules: each schedule’sschedule_id,cron,variables, andcreated_at, oldest firststate:enabled,paused, ornullwhen the Function has no schedule. It applies to all of the Function’s schedules.paused_reason: why the schedules are paused, ornull
GET /functions/{function_id}, or fn.get() in TypeScript) also has schedule_cron, schedule_variables, and schedule_state. schedule_cron and schedule_variables describe only the oldest schedule; use list_schedules() to see all of them.
Scheduled runs appear in the Function’s run history like any other run. See Function Management.
Paused Schedules
Notte pauses a Function’s schedules when their runs cannot succeed without your intervention.paused_reason tells you why:
credit_exhausted: your workspace ran out of creditfunction_inactive: the Function is no longer activemanaged_auth_failure: a managed authentication login the Function depends on failed
state becomes paused.
To resume, fix the cause and call client.functions.resume_schedules(function_id) (POST /functions/{function_id}/schedules/resume). Every schedule is enabled again as it was. Calling set_schedule() / setSchedule() also resumes, but it replaces all schedules with one.
Delete Schedules
Removing a schedule stops its future runs; the Function’s other schedules keep running.delete_schedule() / deleteSchedule() removes all of them. The Function itself is unchanged and can still be invoked manually.
The examples above clean up in finally, including when a request fails.
Best Practices
- Match the frequency to how often the data actually changes; every run uses browser time and credits.
- Make runs idempotent so a repeated or overlapping run does no harm.
- Return structured results and raise on failure, so failed scheduled runs show up as
failedin the run history.
Next Steps
Invocations
Invoke Functions manually
Management
Monitor runs and manage versions
Creating Functions
Write schedulable Functions
Console
Configure schedules in the Console