背景OpenCpu R在Docker中的过程

我在OpenCPU / Docker中运行R脚本,并寻找如何运行脚本来创build后台进程,并返回进程已启动的消息。 像这样的东西:

fun1<-function(arg1,arg2){ #calling different function to run in background, using arg1/arg2, no need #of result now, I will check the result through the file later fun2(arg1,arg2) return('Process has started') } 

我如何在后台运行fun2? 所有的function都在包内,我试过Rscript,但没有成功。 任何想法或包? 我相信很多人已经通过这个。