fix register_cron error