ecs_stop_task function

Stops a running task