refactor cron init