Refactor methods involving the cron tasks