Skip to main content

Schedule triggers are not available on CircleCI Server

A schedule in config can trigger a GitHub or Bitbucket pipeline on Server. The Triggers page schedule is not on Server. GitLab has neither. Call the pipeline API from your own scheduler for a setup workflow or for GitLab.

On CircleCI Server, a schedule in .circleci/config.yml can trigger a pipeline for a GitHub project or a Bitbucket project. A schedule trigger on the project Triggers page is not part of Server. A GitLab project has neither kind of schedule.

Use a schedule in config

Add the schedule on the workflow in config. Server registers that schedule and triggers a pipeline when it fires. The same limits apply as on Cloud:

GitLab is outside this path on Server and on Cloud.

Trigger a pipeline from your own scheduler

Call the pipeline API on a timer in these cases:

  • The pipeline is a setup workflow.

  • The pipeline expects pipeline parameters.

  • The project is on GitLab.

A Kubernetes CronJob can send the request. A second project can send it too, if that second project is GitHub or Bitbucket and already has a config schedule.

The token needs permission to trigger pipelines on the target project. Replace <server-host> with the Server hostname. Replace <project-slug> with the slug from Project Settings, for example gh/<org>/<repo>.

curl -sS -X POST \
  -H "Circle-Token: $CIRCLE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"branch":"main"}' \
  "https:///api/v2/project//pipeline"

CircleCI triggers a normal pipeline from that request. Setup workflows work. Add a parameters object next to branch when the pipeline expects parameters.

Did this answer your question?