make script more cron friendly to allow for automation