#816 add a log for duplicate notification dates
#816 1. create a method lastESMScheduleDate, and use it to calculate the next esm cycle start correctly;
2. don’t save the esm schedule array if it’s empty, so that we can always have a valid last generated esm schedule date to calculate next esm cycle start whenever the major task is executed.