From http://stackoverflow.com/questions/4984725/how-to-test-cron-job