messy refactor to allow unitesting of cron parse