cron job scheduled and function for notifications written