Updated to run via cron