Got rid of the scripts and pushed the logic into the task.