add cron script and fix trigger count expire