Refactor rally cron posting function