changes to make scripts run from a cronjob