Reset counter for delayed jobs


I am looking to set up a delayed job in Gitlab. I have a job in the deploy stage of my pipeline that can be triggered only manually which sets up some infrastructure. Lets call this job A

If this manual job is selected and successfully executed then i would like to trigger a delayed job (job B) using when:delayed that runs 24 hours after job A.

Here is a common use case that I am not quite sure how to solve:

Lets say we write some code and trigger job A on Monday morning (AM). The infrastructure is ready and job B is queued to run on Tuesday AM to delete the infrastructure.

Now lets say though that on Monday afternoon (PM), we make some changes and again manually trigger job A to update the infrastructure.

Does this now mean that job B will be updated to be triggered on Tuesday PM or will this job still be queued to execute on Tuesday in the AM ?

Please advise, the documentation here ( is very thin on how this works or if this is possible.


  • J

We do have the Auto-cancel redundant, pending pipelines option enabled in our pipeline settings which seems to imply that this would work out of the box so to speak?

Wondering if anybody could confirm that