jobRunScript not working


I would like to run jobRunScript from the rstudioapi package, but I am not having much luck with it.

jobRunScript(path = '~/STATS/rscripts/helloworld.R')

Error: Function runScriptJob not found in RStudio.

Strange that I am calling jobRunScript, but runScriptJob is not found. What might be going on?

I am using:
Rstudio version 1.0.143
R version 3.6.0
rstudioapi package 0.10.
on the mac.

Many thanks,


Since you have posted on this category, I assume you are trying to run a job from a shiny app but I don't think this is going to work since, as far as I know, you can only use that function with a running RStudio session and that is not the case with apps running on shiny-server.

Hi, thank you for your response. Yes, that is precisely what I was hoping to do. In fact, I was hoping to follow thilo's workaround in this post:

Do you think that can not be done?

Many thanks,


I believe that walk-around solution relies on launching the app from RStudio IDE and not directly from shiny-server, I have no experience with that kind of deployment (although I know some people use it) so I can't tell if is actually possible (or recommended).

I am running this from rstudio. I simply type those 2 commands (library() and jobRunScript() . in the console window of rstudio.

As it is, it is not related to rshiny. The script simply says "print('hello world'). So I am running jobRunScript, as described in the documentation, but it gives me an error. So I think that's a bug in jobRunScript.

If I open a new terminal, and run R, and then run jobRunScript(..) . it says
"RStudio not running",
which is also peculiar, because rstudio is running.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.