Skip to content

Latest commit

 

History

History

programmatic-job

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Programmatic background jobs

While background jobs are best suited for one-off, ad-hoc usage, there are times when it is beneficial to programatically orchestrate background jobs. Local and Launcher jobs can be programatically handled with functions in the rstudioapi package . The examples here use the same estimate-pi.R script as the simulation example.

Local Jobs

Local jobs can be started using rstudioapi::jobRunScript(). An example of this pattern is found in local-jobs.R.

Launcher Jobs

Launcher jobs can be more flexible than local jobs. The rstudioapi::launcherSubmitJob() function is can be used to launch specific R commands or scripts as Launcher jobs. An example of this pattern is found in launcher-jobs.R.

Output

Both the local and Launcher examples illustrated here save output to the output/ directory. The analyze-output notebook contains code to analyze and visualize the output files generated by the jobs.