Exclude certain weekdays

Hello,

We have developed workflows that need to be launched via schedules with an interval. We have defined an offset and a jitter in order to randomize the schedules. However, in some cases, we need to exclude certain weekdays.

We used the Skip field of the ScheduleSpec structure to add a ScheduleCalendarSpec with the DayOfWeek field filled in. We understand that a timestamp is excluded only if it corresponds exactly to a case that is filled in Skip. So we also filled in the Hour field with a range from 0 to 23 and the Minute and Second fields with a range from 0 to 59.

In spite of this, we still find schedules for normally excluded weekdays.

Have we missed something?
We thank you in advance.

Hi @Anemys

I will look into it, could you share the spec you have now?

Thank you,

Hello @antonio.perez

Here is a concrete example of a specification with which we had a problem:

temporal.ScheduleSpec{
	Intervals: []temporal.ScheduleIntervalSpec{
		{
			Every:  48 * time.Hour,
			Offset: 8*time.Hour + 51*time.Minute + 35*time.Second,
		},
	},
	Skip: []temporal.ScheduleCalendarSpec{
		{
			Second: []temporal.ScheduleRange{
				{
					Start: 0,
					End:   59,
				},
			},
			Minute: []temporal.ScheduleRange{
				{
					Start: 0,
					End:   59,
				},
			},
			Hour: []temporal.ScheduleRange{
				{
					Start: 0,
					End:   23,
				},
			},
			DayOfWeek: []temporal.ScheduleRange{
				{
					Start: 6,
					End:   0,
				},
			},
		},
	},
	Jitter: 9*time.Hour + 8*time.Minute + 25*time.Second,
}

Thank you

Hi everyone,

I’m bumping this topic as I haven’t received any updates after providing additional information following the initial response.
Has there been any progress or new suggestions since?

Thank you in advance for your help!

Best regards