Launching Workbench Jobs

Advanced

The Workbench Jobs view

  • Select the Posit Workbench Extension tab in the Activity Bar to display the Workbench Jobs view.

    Workbench extension highlighting the Workbench Jobs pane

    This view displays controls for starting new jobs as well as a list for viewing the status of existing jobs.

Start a Workbench job

  • In the top right corner of the Workbench Jobs view, click +.

    Workbench Jobs - Start new button

    The Launcher options for a new job display. This dialog is similar to the one in RStudio Pro.

  • To enable the launch button, specify the job name and script extension.

    Workbench Jobs - Starting a new job

If you worked on an R or Python script, the launcher opens that script as the Script parameter. Opening a directory in VS Code sets the Working Directory parameter; otherwise, it defaults to your home directory. Click the Script and Working Directory fields to browse the file system and change their default values.

If you don’t have an active script or haven’t taken recent actions in the VS Code, the launcher dialog displays without default settings for Script and Working Directory. In this case, use the browse feature to specify the desired paths. Once you select a script with a supported extension, the dialog shows additional script options.

Version and arguments

The version and argument settings are preconfigured based on the selected script type.

Version

System Default:

  • The System Default version option is the safest for running jobs in clusters like Kubernetes, which may not include the R Versions presented in the drop-down. The version information is pulled from the local server and not from the Kubernetes image, so it is possible there could be a version mismatch. A reminder displays if you select a non-local cluster and specify a version other than System Default.

    System Default

  • System Default calls R or python directly, and assumes that they are specified on the PATH variable. Local Version information is read from the r-versions and py-versions files, which are typically located at /var/lib/rstudio-server/r-versions and /var/lib/rstudio-server/py-versions respectively. The path to the r-versions file can be adjusted in rserver.conf.

Other:

  • The user can also specify a custom path by selecting Other… and browsing for it, or by typing a custom path directly into the text field.

    Select custom version path, and showing reminder about version on cluster

Arguments

If you want more control over the arguments, you can modify them. When you first select a script, the arguments display as they will be passed. To make changes, click Modify next to the argument preview.

Modify arguments of the script before launch

  • You can change argument flags or values by typing directly into the fields.
  • To remove an individual argument, click the X button next to the argument.
  • To add new arguments, click + Add argument.
  • To reset all fields to their default values, click Reset. You can see any changes, deletions, or additions in the preview line above.

Viewing and managing Jobs

Once a job has been submitted, it displays in the Workbench Jobs view and updates automatically. This list mirrors the list displayed on the homepage:

  1. The drop-down arrow next to each job shows additional details about the job, and in the event of a failure, what the non-zero exit code was.
  2. The notepad button, adjacent to the X button, opens that job’s output stream and views it in the Output viewer. The Output viewer automatically opens. If it does not, then open it with View > Output.
  3. The X button stops a running job. Additional confirmation is required for this operation.

View and manage the job statuses and stream their output

Back to top