Improves update script to run in cron.