Pipeline schedule not running on correct time.
For impacted users
You will need to edit and save the pipeline schedule in order for the app to correct the next run time as the fix is already on prod.
Summary
When configuring a Pipeline schedule to 0 9 * * fri%2
the Pipeline should run at 9:00 every other Friday.
Instead, it runs every Friday.
Steps to reproduce
- Create a Pipeline schedule with
0 9 * * fri%2
- Watch it run every Friday.
What is the current bug behavior?
It runs every Friday instead of every other Friday.
What is the expected correct behavior?
It should run every other Friday.
Initial investigation
When I test it with Fugit
, I get back.
c = Fugit::Cron.parse('0 9 * * fri%2')
c.next_time.to_s
=> "2024-03-15 09:00:00 +0000"
This appears to be correct however both the UI and when it runs are incorrect.
related ticket: https://gitlab.zendesk.com/agent/tickets/499679
Possible fixes
The cause is that Fugit's mod is not working well with timezone, see the following example:
[4] pry(main)> Fugit::Cron.parse("0 6 * * tue%2+1 America/Los_Angeles").next_time.to_s
=> "2024-11-12 14:00:00 +0000"
Fix is to upgrade et-orbi
from 1.2.7
to 1.2.11
:
[2] pry(main)> Fugit::Cron.parse("0 6 * * tue%2+1 America/Los_Angeles").next_time.to_s
=> "2024-05-07 13:00:00 +0000"
NOTE: make sure we add test using above example
Edited by Ronald van Zon