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:
- use a resource to define the time interval
- indicate the time dependency in a
get
step decorated withtrigger: true
.
Tasks¶
-
Study the file
time-triggered.yml
and note how the time trigger is declared and configured. -
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.
-
Sit back and watch the job trigger at least twice.
-
Before proceeding, edit the pipeline yaml file and revise the time interval to 24 hours, to prevent the job from triggering so frequently.