Store every few hours, the meteorological accuracy of various locations

I have included in my web app, the weather forecast of the locations included in a small list. Every time I open the tab, the application freezes for a few seconds, just to load the weather elements. Is there a way to load the relative elements every 6 hours, for example, or once a day, to speed up this operation? Has anyone experimented with it?
Thanks! :slight_smile: @Robert_Petitto @Jeff_Hager @Darren_Murphy …

You can write script with a time trigger

1 Like

How are you updating the forecast? Through an Experimental Code column?

1 Like

Yes, just like that!

Solved!
I finally found a solution worthy of being called that.
I’ve used a Google Sheet plug-in “Api connector” from mixedanalytics.com that works perfectly with Openweathermap to which you just have to feed data taken from a Google sheet, to populate a table with selectable fields.
This is an example, my example:
https://api.openweathermap.org/data/2.5/weather?q=++Places!S2:S+++&units=metric&appid=API-key&lang=EN

The query part is as follows:
+++Places!S2:S+++.
where Places is the spreadsheet and S is the column (in my case from the second value to all values).
Everything else can be easily developed in glide environment.
The plugin is free as far as API operation is concerned (not only openweathermap). In my case where a time trigger was required, it would be chargeable.

If some guru could think of a little code to run the plugin hourly, that would be great.

Thank you @Uzo e @ThinhDinh for the support!

1 Like

Hola @profxeni

I might give a plan B to have a simpler solution and not use a GS script:

You can use my new Toggle Trigger idea based on time to fire your API call, use Glide Tables instead and have an updated info every 20 sec, 120 sec, 10 min or 50 min.

You can see it or copy the APP here https://toggle-trigger.glideapp.io

Saludos

3 Likes

@gvalero could you elaborate on how you achieved that? It is a time trigger that hasn’t been possible inside glide until now I think.
Own code? If so will you share the code? Thxđź‘Ť

I just tried your app, and it looks like it does the same thing as google scripts or regular time delay Glide duration math column… (both not time reliable methods) so my question is … what is the advantage?

Hola @krivo and @uzo

Let me create a new thread about it to explain the scope of this Toggle action Trigger based on time.

Meanwhile, you can copy the APP and see the logic, it just a trick playing with Trunc() and Mod() functions.

Saludos

3 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.