Safeguard to control the behaviour of Task-Based Systems