Refactor cron job
Refactor rake task