Sending reports "RMarkDown" only on business days in the country

Hello,

In the company we want to schedule the sending of reports only on business days. In our case, on non-working days (Holidays) we do not have data to generate the reports.

In Rstudio Connect, we only find the possibility of programming it every day or from Monday to Friday.

There is some way to cancel the update and the sending of the report mail from the RmarkDown code. For example

if (nrow (data) == 0) {stop ()}

Without affecting the current report.

Thank you.

Hi @apalacio,
Great question. You can incorporate logic into your RMD to send the report conditionally. While you may set the report to run on a M-F frequency, you can have more granular control to suppress the email on particular days using suppress_scheduled_email(). There's a nice example here: Customized Conditional Emails with RStudio Connect - RStudio :: Solutions