Skip to content

Scheduling and Automation

Workbench is an interactive tool. It has no scheduler of its own. Users who want something to run on a schedule have several options:

Method Runs where Survives logout Logging and alerts
Workbench Jobs Workbench host (or cluster) as the user Yes, until finished Job output in the IDE
Launcher jobs via the Workbench API Workbench host or cluster Yes Via API
User crontab Workbench host as the user Yes Whatever the script writes
Connect scheduled content Connect host Yes Run history, email on failure

Recommendation

Publish recurring work to Connect and schedule it there. Connect keeps run history and logs per execution, emails owners on failure, and does not depend on anyone's session.1 Content is restored from the deployment's manifest, so the run environment is reproducible.2

User crontabs on Workbench hosts are invisible to admins until something breaks. They break when the host is migrated, and they run with whatever packages happen to be in the user's library that day. If you allow cron at all, inventory it before every migration:

sudo ls /var/spool/cron/

Workbench API

The Workbench API lets scripts start sessions and jobs.3 Enable only the tiers you need:

# /etc/rstudio/rserver.conf
workbench-api-enabled=1
# workbench-api-admin-enabled=1
# workbench-api-super-admin-enabled=1

Tokens for admin and super admin tiers can act on other users' sessions. Treat them like root credentials.