RStudio Connect re-run report if failed

I have several reports scheduled to run via RStudio Connect. Occasionally the scheduled runs of these reports fail due to rate-limiting of some of the processes within them. Is there a way in the scheduler to ask RStudio Connect to schedule a second run if and only if the previous run failed? This may be something I should just handle programmatically within the report, but I wanted to ask if such a feature already exists in RSC.

This is great feedback, thank you @babichmorrowc!! Unfortunately, this feature does not exist today, but I will definitely share this idea with our team!

Some ideas of ways to architect today:

  • Use a "manager" process that uses the Connect API to figure out if the report was successful / failed and re-trigger if / when necessary
  • Run the report more often than necessary, and exit early if/when another run is not necessary
  • Have some type of an exit handler, waiting, or polling that tries again / etc. as you describe

I am very curious to hear about the solution you have come up with, if you have one! :smile: Thanks for reaching out!

Hi Cole! Thank you for the response on this! Which Connect API endpoint would you recommend to determine report run success?

Woops. Sorry for missing this!

This one is not documented super well (I should improve that in the connectapi package, at least), but the functions you want to use are connectapi::get_jobs() and connectapi::get_job() (which gives more specific detail - like logs - for a particular job).

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.