update script to call via cron