I have a pipeline set up already, but I'd like to schedule it to run once, in the future at a specific time. This way i won't have to be around to trigger it at the moment I want it to run. Is this possible?
G'day, @Cyrus Afshari
You can check our guide below on how to create schedules for your pipeline:
Create a schedule for your pipeline
However, if you need it to be on a specific day or time you'll have to use our API endpoint to create a custom schedule.
Pipeline - Create schedule endpoint
For example:
curl -u <username>:<password> -X POST --url https://api.bitbucket.org/2.0/repositories/<workspaceID>/<repoSlug>/pipelines_config/schedules/ --header 'Content-Type: application/json' --data '{"cron_pattern": "0 0/1 * 1/1 * ? *", "enabled": "true", "type": "pipeline_schedule", "target": { "ref_type": "branch", "ref_name": "<branch_name>", "type": "pipeline_ref_target", "selector": { "type": "branches", "pattern" : "testpattern" } } }'
Regards,Syahrul
I have pipeline variables that I can set via the UI (and have default and allowed-values for) when I'm manually triggering, so how would I set those variable values via the API for a scheduled run?
I am looking for this feature but it seems now 4 years since it being requested, it still hasn't been implemented: https://jira.atlassian.com/browse/BCLOUD-20328
Hi @Cyrus Afshari
I got it. I will inquire about the feature request, so please watch it for any future updates. Unfortunately, there are currently no workarounds to set variables for a scheduled run unless the variables are manually input or exist in the variables list.
It looks like you're new here. Sign in or register to get started.