I have used the Resource Manager to globally manage when to stop queries after a maximum time has been reached. Using Resource Manager, you would first create a Plan to stop queries after a certain maximum time. Then you would create Rule(s) for when this Plan is performed. More information can be found in the [Resource Manager](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/resource_manager/resource_manager#resource-manager) section of the Virtual DataPort Administration Guide.
Hope this helps!