changed trigger to cron