Task restart mechanism.