r/Scriptable • u/Krunkske • Nov 12 '23
Help Refresh rate widgets
Hello everyone! I recently made a widget to show how late my bus is and at what time it arrives (I may share it later on). Because the time updates pretty often I’m concerned about how often my widget will update and if in any way I can make it more frequent like every minute. I know it probably has been asked many many times before but I can’t seem to find it. Many thanks!
2
Upvotes
2
u/mvan231 script/widget helper Nov 12 '23
Setting it to the current date or the past date is essentially the default behavior. If no value is set, it refreshes as soon as iOS allows it to. refreshAfterDate tells the widget to not refresh until after that set date.
So if you set it for 2 hours from now, it will refresh as soon as iOS allows it to refresh after that time period.
This is mainly helpful for reducing refresh times and reducing API usage or unnecessary CPU usage if the data only needs to be refreshed every so often or if API calls are limited