Create a cron job
create_cronSchedule recurring pipeline runs in Woodpecker CI using cron expressions, descriptors, or intervals. Specify repository, job name, and schedule to trigger builds automatically.
Instructions
Schedules a pipeline run. The pipeline runs with event "cron", so steps and secrets restricted to other events do not apply to it — a cron job whose steps all have "when: event: push" runs and does nothing.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"repo_id": "<repo_id>",
"name": "<name>",
"schedule": "<schedule>"
},
"name": "create_cron"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the cron job, shown in the UI and on the pipelines it starts. | |
| branch | No | Branch to run. Defaults to the repository default branch. | |
| repo_id | Yes | Numeric repository id. lookup_repository turns an "owner/name" pair into one; list_repositories shows both. | |
| schedule | Yes | Schedule as a five-field cron expression ("0 4 * * *" is 04:00 daily), a descriptor (@yearly, @annually, @monthly, @weekly, @daily, @midnight, @hourly), or "@every <duration>" such as "@every 30m". No seconds field. | |
| timezone | No | IANA time zone the schedule is interpreted in. Defaults to UTC. Note that the official Woodpecker container image carries no time zone database, so on a stock Docker deployment anything but "UTC" is rejected with "unknown time zone" — that is the server missing tzdata, not a wrong name. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| truncated | No | Present only when the answer was shortened to fit the budget. |