Fix wrong date format in cron function