Removed setting inside cron function