Fixed bugs in updateStartOfDayCount in config/initializers/task_scheduler.rb