Added support for external cron