Adding unit test for cron runmode