In Pre Execution functions you can set intervals manually, which you can take from any request:
function a(){
this.intervals = ["0",dashboard.getParameterValue('value2')];
}
In 'value2' I write the result of my query. And in this way it is possible to set dynamic intervals.