CQs always run against an interval relative to now. There is no way to run CQs on a delay, but simply set the RESAMPLE EVERY clause to make sure you re-query after all the data has arrived.
For instance, assuming it's a one day CQ CREATE CONTINUOUS QUERY MINUTE ON db RESAMPLE EVERY 6h FOR 2d begin select ... into ... from ... where ... group by ..., time(1d) end That will run the CQ every 6 hours over the two day intervals that end at now() or include now() if it doesn't fall on a boundary. At midnight on Jan 3, it will run the CQ for Jan 1 and Jan 2. At 6 a.m. on Jan 3, it will run the CQ for Jan 2 and Jan 3. At noon on Jan 3, it will run the CQ for Jan 2 and Jan 3. At 6 p.m. on Jan 3, it will run the CQ for Jan 2 and Jan 3. At midnight on Jan 4, it will run the CQ for Jan 2 and Jan 3. At 6 a.m. on Jan 4, it will run the CQ for Jan 3 and Jan 4. ... With this setup, even data written 6 hours out of date will get picked up by the CQ. On Wed, Sep 21, 2016 at 2:52 PM, <[email protected]> wrote: > Thanks > > I guess it can work for 1h but I also have same queries for 1d and 30d > intervals. So I'm looking for a way to allow my data be little late (up to > 30 mins) and recalculate cache after this 30-minutes windows closed. > > -- > Remember to include the InfluxDB version number with all issue reports > --- > You received this message because you are subscribed to the Google Groups > "InfluxDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/influxdb. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/influxdb/c794fabb-4353-4e4d-b77f-f1ae279aee26%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Sean Beckett Director of Support and Professional Services InfluxDB -- Remember to include the InfluxDB version number with all issue reports --- You received this message because you are subscribed to the Google Groups "InfluxDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/influxdb. To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/CALGqCvNw-__nBU%3Di%3DUrL06vkPOxGA5qoBxoNa6ma-3G21zYqkg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
