concourse / time-resource

a resource for triggering on an interval
Apache License 2.0
44 stars 33 forks source link

If two time resources are specified, job will not trigger until both resources are satisfied. #20

Closed DonBower closed 7 years ago

DonBower commented 7 years ago

I have a pipeline, to backup Ops Manager, which I want to run twice a day. But when I first start the pipeline, and it's just after noon in Chicago, the job does not start. It seems there has to be both resources are triggered.

- name: trigger-daily-after-12am
  type: time
  source:
    start: 00:00
    stop: 03:00
    location: America/Chicago

- name: trigger-daily-after-12pm
  type: time
  source:
    start: 12:00
    stop: 15:00
    location: America/Chicago

And the jobs section has:

  - get: trigger-daily-after-12am
    trigger: true

  - get: trigger-daily-after-12pm
    trigger: true
jtarchie commented 7 years ago

If there are no versions of resource available, concourse will not trigger a build. This is workflow in concourse that resources are an AND operation not a OR operation. You have to have all resources available for a job to build.

I think your issues would be resolved by having the time resource providing an initial zero-time.