Is there a way to know whether a function is currently scheduled for execution?

I have a scenario where I need to know whether a function is currently scheduled for execution on a timed event; before I add a state variable to track that, I'm wondering if there is a way to check whether that function is scheduled for execution in the future.
Thanks!

There is:
In your Installed apps list, find the app you want to check and click on the little blue ‘i’
This will show you a page with the app details, including, at the bottom, a list of scheduled tasks

Andy

If you are taking about RM etc. then click on the blue 'i' to the right of the rule.
Scroll down and you will see a section for scheduled jobs.
It should be in there.

I'm talking about a programmatic way to achieve that; I know how to get that information from UI.

I would probably use a state.variable set to ‘true’ if scheduled

Similar discussion here:

Andy

OK, sure, that's the alternative solution; that also implies that the answer to my question is "no".