Fix the cronjob generator so it runs correctly