finalized code of smsall cron job