Create or replace one database schedule
database_schedule_setCreate or replace a named database schedule in the selected Dev or Prod environment. SQL statements execute as the application's runtime role with row-level security. Write statements must be safe to repeat. Supply exactly one of cron (five-field UTC expression) and every_seconds (60 to 2678400). timeout_ms accepts 1000 to 30000 and defaults to 10000. Replacing a schedule overwrites its definition and requires confirmed: true. A reached Stop budget disables schedules within about an hour and refuses enabled: true with project_budget_exceeded. Restoring a schedule requires its full definition.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cron | No | Five-field cron expression evaluated in UTC. Send exactly one of cron or every_seconds. | |
| name | Yes | Database schedule name, unique per project environment. | |
| enabled | No | ||
| confirmed | Yes | Confirms that the statements run with the application's runtime role. | |
| project_id | Yes | Project identifier. | |
| statements | Yes | Statements run in order by the application's runtime role. At most 16 KiB per statement and 64 KiB in total. | |
| timeout_ms | No | ||
| environment | Yes | Application environment the mutation applies to. | |
| every_seconds | No | Interval in seconds between runs. Send exactly one of cron or every_seconds. |