6 Scheduling

R Markdown reports and Jupyter Notebooks that are published with source code can be re-executed by RStudio Connect. See section 3.4.2 to learn how to publish R Markdown reports and the rsconnect-jupyter User Guide to learn how to publish Jupyter Notebooks.

Re-executing content can either be done manually or on a schedule. After navigating to the “Schedule” pane in the configuration window, you might see “The source code for this content was not published. The output cannot be refreshed.” If this is the case, then you will need to publish source code before it is possible to schedule your content.

Schedule pane with no source code

Similarly, Shiny applications or R Markdown documents with a Shiny runtime (Shiny documents) cannot be scheduled. Shiny assets show the latest data each time they are refreshed.

Schedule pane for a Shiny document

In other cases the Schedule pane provides options to schedule your asset for execution on RStudio Connect.

Schedule pane showing all options

6.1 Date and Time

The start date and time defaults to the current user’s date, time, and time zone. The schedule will be built off of this date and time. Take care to keep in mind how daylight savings time (DST) might affect the actual execution time of the report.

If you choose a start date and time in the past, execution will begin at the first future execution that satisfies “Schedule Type,” measured from the time that changes are saved.

6.2 Schedule Type

The schedule type and related fields will determine how frequently the R Markdown document is executed by RStudio Connect. Using the “Date and Time” above as an anchor, “Schedule Type” defines the time interval between executions.

The following interval configurations are all supported:

  • defined in minutes
    • e.g.: “every 15 minutes”
    • e.g.: “every 90 minutes”
  • defined in hours
    • e.g.: “every 3 hours”
    • e.g.: “every 25 hours”
  • defined in days
    • e.g.: “every 2 days”
    • e.g.: “every 40 days”
  • every weekday
    • e.g.: “Monday, Tuesday, Wednesday, Thursday, Friday”
  • defined in weeks (on select days of the week)
    • e.g.: “every week on Tuesday and Thursday”
    • e.g.: “every 8 weeks beginning on a designated date”
  • semi-monthly (1st and 15th)
    • e.g.: “on the 1st and 15th of every month”
  • semi-monthly (14th and last)
    • e.g.: “on the 14th and last day of every month”
  • monthly on a given day of the month
    • e.g.: “every 2 months on the 3rd”
    • e.g.: “every 8 months on the 30th”
  • monthly on a week / day
    • e.g.: “every 3 months on the 3rd Tuesday of the month”
    • e.g.: “every 9 months on the 1st Saturday of the month”
  • defined in years
    • e.g.: “every 2 years”
    • e.g.: “every 8 years”

6.3 Publish Output

When content executes, you can decide whether or not the output should be saved and published to RStudio Connect. If you opt not to have output published after it is generated, any emails will be sent and any side-effects such as database writes will occur, but the report output will not be saved on Connect. Further, there will be no output history (See section 7).

In order to save and publish output, as well as track the history of output on Connect, keep the “Publish Output” box checked.

6.4 Send Email

This section of the Schedule configuration determines if and where emails will be delivered after execution. If checked, the owner of the content will always be notified unless they opt out. Further, content output can be sent to:

  • all collaborators
  • all viewers
  • named additional recipients

By default the rendered content will be attached and RStudio Connect will generate a standard subject line and email body. For more information on the ability to customize this email, see the section on email customization.

If you are having difficulty sending emails, contact your RStudio Connect administrator.