I have a query that runs periodically using the "Runthis query periodically" feature. I want to stop this query programmatically from my JavaScript code. Is there a way to cancel or stop the periodic execution directly through JavaScript?
1 Like
Hi @peregrinus! Thanks for reaching out.
That particular property of a query is read-only, meaning it can't be dynamically set via JavaScript. It is, however, possible to dynamically disable a query via an advanced configuration option and thus prevent it from running.
My initial idea is to define a global variable with an initial value of false
and then reference that variable in the "Disable query" input that is shown above. From any JS script, you can then change the value of the variable to true
in order to prevent the query from running.
I hope that helps!