fixed cron job and added a new mem variable