Refactored cron module