Scheduling a stage in a future date


#1

We have a need to stagger add a delay between stage execution. Let’s say wait for 10 minutes before the next stage is executed.

I see two options right off the bat:

  1. Utilizing cron trigger to schedule an execution, but cron (quartz cron trigger) would not be a good fit since it is
    only for fixed schedule. It also means another pipeline, as the trigger is per pipeline if I understand correctly.
  2. Utilizing conditional execution and utilizing potentiall a complex Spring Expression Languag. I beliueve it can even invoke Java methods. Still exploring that
  3. Scheduling windows again it is for schedule.

Any one done this or can send me in the right direction ?


#2

Any reason the Wait stage wouldn’t work for you?


#3

This is probably what I am looking for did not find it ? please point me in the right direction.

erez


#4

OK found it. Pretty straight forward and will work no need to get fancy. thanks missed it for some reason. Appreciate the assistance in this task.


#5

Good to hear!


#6

Just for documentation purposes. Cron trigger support one time run. Applies for pipeline, e.g.:

10:10am 10th October 2018
0 10 10 10 10 2018

Look at the following URL:

https://www.freeformatter.com/cron-expression-generator-quartz.html

Wanted also to add if someone looks up this in the future that I have misspoken.