Add option to run the script as a cron job