Test cron & send mail

+ added dates function in main.js