If you add a job with a CronSchedule that is to be run at only one time to the PeriodicExecutor, it will never stop executing. It also happens if you add one in the past:
The code below will run indefinitely now even though the cron was scheduled to run at midnight 1-Jan-2014:
The problem is CronSchedule.nextExecution() returns 0 if there is no valid date in the future. This then leads PeriodicExecutorImpl to sleep for 0 seconds between runs.
My suggestion is around line 370 to do something like: