Skip to content

Time-based triggers

Concourse defines a concourse/time-resource which provides a mechanism to define a time-based dependency.

This means that a job can be defined in such a way that it runs periodically.

All we need to do is:

  1. use a resource to define the time interval
  2. indicate the time dependency in a get step decorated with trigger: true.

Tasks

  1. Study the file time-triggered.yml and note how the time trigger is declared and configured.

  2. Set the pipeline, unpause it, but this time there is no need to trigger the job.

    It will self-trigger every thirty seconds, approximately.

    Note

    Concourse internally polls resources once per minute. So in this case a time trigger of 30 seconds will in fact trigger once per minute.

  3. Sit back and watch the job trigger at least twice.

  4. Before proceeding, edit the pipeline yaml file and revise the time interval to 24 hours, to prevent the job from triggering so frequently.