changed sync to cron