Launching Workbench Jobs
The Workbench Jobs view
Select the Posit Workbench Extension tab in the Activity Bar to display the Workbench Jobs view.
Start a Workbench job
In the top right corner of the Workbench Jobs view, click +.
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.
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 calls
R
orpython
directly, and assumes that they are specified on thePATH
variable. Local Version information is read from ther-versions
andpy-versions
files, which are typically located at/var/lib/rstudio-server/r-versions
and/var/lib/rstudio-server/py-versions
respectively. The path to ther-versions
file can be adjusted in rserver.conf.
Other:
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.
- 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:
- 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.
- 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.
- The X button stops a running job. Additional confirmation is required for this operation.