Switch the query by time

Hi,

I need to switch the query from A, B and C after the working each shift 6am - 2pm ,2pm - 10am …etc.

Maybe someone faced such problem.

Thank you :slight_smile:

Welcome @bartoszaffelski

What is your datasource? Can you share the query you have written?

I want to disable / enable the queries after each 8 hours , 6am, 2pm and 10pm.

Is it possible ?

I’m working on postgres BD, sql code looks good.

I do not know enough about PostgresDB if it’s possible, but using Flux in InfluxDB, they offer a function called hourSelection

|> hourSelection(start: 6, stop: 14)

thank you for the explanation, but I’m asking about grafane, does it have such functionality in it?

You want it to disable one of the queries automatically? Thats not possible
The better question is what are your requirements? What are you aiming to accomplish?

I assume each query is for a specific time range

So when 6 to 2 is enabled so you want to disable the 2 to 10 and 10 to 6 etc?

In that case just use query with dynamic time ranges and get rid of the 2 other queries