Fix: nullpointer exception when the scheduled task is designed to run
only once at a given date