Pipeline should error out after a particular time

I want to setup a task that should error out and fail if it exceeds a particular time limit.Can anybody suggest some solution.

There is a “Timeout” field in the task Create/Edit dialog that should do what you want. Is it not working for you?