Scheduled pipelines allow you to run a pipeline at hourly, daily or weekly intervals.
- Scheduled pipelines run in addition to any builds triggered by commits, or triggered manually.
- You can create a schedule for any pipeline defined in your
- If you make a custom pipeline it will only run when scheduled or manually triggered.
1. Create a pipeline
Here's a simple example showing how you would define a custom pipeline in the
pipelines: custom: # defines that this can only be triggered manually or by a schedule staging: # The name that is displayed in the list in the Bitbucket Cloud GUI - step: script: - echo "Scheduled builds in Pipelines are awesome!"
Read more about custom pipelines.
2. Create a schedule
Create a schedule for your pipeline as follows:
- Go to the repository in Bitbucket.
- Click Pipelines then Schedules (at the top right), and then click New schedule.
- Choose the Branch and Pipeline that you want to schedule:
- The schedule will run the HEAD commit of the branch.
- The pipeline must be defined in the bitbucket-pipelines.yml on the branch you selected.
- Set the Schedule:
- Select how often you would like the pipeline to run (hourly, daily or weekly)
- Select the time (in your local time). However, your pipeline will be scheduled in UTC time (unaffected by daylight savings hours)
- The scheduled pipeline can run at any time in the selected time period. This is to distribute all schedules in Pipelines triggering across the hour.
Remove a schedule
Go to Pipelines > Schedules (at the top right) to see all the schedules for a repository.
- Remove a schedule by using the 'trash' icon at the right of the schedule.
- Note that schedules created using the API are displayed as a Cron expression (such as
0 10 15 * *).
Last modified on Oct 4, 2018
Was this helpful?Yes Provide feedback about this article
Powered by Confluence and Scroll Viewport.