using cron job as a scheduler