Cleaning up scheduled_task_spec