adds cronenv function to simulate an environment that a cron job would run in