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.