Details
Description
Starting a PeriodicJob that is not in the NOT_SCHEDULED state causes an invariant failure (see here). However, a PeriodicJob might get stopped before it's even started if its process receives a kill signals before it has fully initialized. To tolerate such scenarios, PeriodicJob should check if shutdown is in progress and quick return before checking the invariant.