Put the periodical resubmitFailedStages() call into a scheduled task