Optimizing periodicity on which scheduler checks for incoming tasks