Forum Academy Marketplace Showcase Pricing Features

Query Scheduled Jobs from Application

Hi

I have looked around but cannot find any documentation on how I might check for scheduled API workflows (i.e. are they scheduled) from within my app. Essentially, I have a multi-tenanted app and each tenant needs a couple of recurring workflows. I have a button to start them and they tend to hang around but they occasionally drop off. I’d like to have a mechanism to alert if they are missing.

Any ideas?

thanks

1 Like

Hello @andrew.waites

After you schedule an api flow the next action allows you to save to a text field the flow id. With this id you can locate the future flow in logs/scheduler

Hi @cmarchan
Understood but is there a call (application level) that I can make to query the logs/scheduler (with or without the flow id)? I don’t want to use the bubble developer interface, I want to use code to query the logs/scheduler. In th ebad old days this would have been a system service call.

thanks

1 Like

Hello @andrew.waites

Not sure about a list query but yes on a cancel flow action with the corresponding flow id

image

Thanks @cmarchan

That is great but of limited use. I need to be able to see if a flow is still scheduled.

regards

@andrew.waites

If flow ID is not empty then it is scheduled
If the field is empty then there is no flow … thus nothing is scheduled :+1:t2:

Carlos

I am sorry but I am slow.

I create a scheduled workflow and save the flow if to a text field on a table. E.g tenant.jobflow

Then if the job disappears then what. That flow text field is magically empty?

Is there a way to query whether a flow is is empty or refers to a non existent flow?

Thanks

Hello @andrew.waites

The flow ID is used to cancel an API flow :smiley: