Day 0 scheduling behavior
Whether it’s from a participant starting, or a block being scheduled for the current day, a number of things happen when a block is created for “today”. Individual events can set themselves to occur “before”, “immediately”, or the “same day” as a block is triggered, all of which need their own special handling when that day is today. In WTH-4894 we hammered down certain behaviors for these.
Before
When scheduling before a block, the study team is able to configure what should happen if the event would be scheduled in the past (Which will always be the case if the block is being scheduled for today)
Skip the event
Any event in the series with a start date in the past will be skipped
Start immediately
Any non-windowed event in the past will happen immediately
Any windowed event in the past will happen immediately, and the end date for the event will shift by as much time as the start shifted. So if I had an event scheduled 8 am to 4 pm the day before, and it got scheduled at 10 am today, then the event would close at 6pm today.
Immediate
Events can be scheduled to happen immediately on the day the block is scheduled for. It was decided that windows should not shift in this case, which is the only way an event can become skipped with this scheduling method.
Any non-windowed event in the past will happen immediately
A windowed event will look at its end_date. If we are past the end_date, we mark the event as skipped. Otherwise, we start the event immediately.
Same Day
Events can also be scheduled to happen the same day as a block is scheduled for. When this scheduling option is selected, you get the same option as you get when scheduling a ‘before’ type event.
If the start time is in the future (Participant starts at 8am and there is a same day event at 12pm), the event is scheduled as normal and will happen then.
If the events start time is scheduled in the past, the behavior depends on what was selected for the event:
Skip the event
Any event in the series with a start time in the past will be skipped
Start immediately
Any non-windowed event in the past will happen immediately
A windowed event will look at its end_date. If we are past the end_date, we mark the event as skipped. Otherwise, we start the event immediately.
This behavior follows the Skip logic of ‘before’ events, but the ‘immediate’ logic of ‘immediate’ events.
After
This schedule type is meant for events being scheduled on Day 1 and above, so should not care how they handle being scheduled in the past.
By Day of Week
This schedule type does not schedule on day 0, so this is not an issue. (If it is a Tuesday, an event scheduled for the First Tuesday will be 7 days away.)