run jobs in sequence

Hi all,
I' like to run these 2 jobs not in parallel, I mean: first run 'job1' and after completion, run 'job2':

dir="xxxx"

rstudioapi::jobRunScript(path = "auto_data_prep_v2 - BR.R", name='job1',importEnv = FALSE, workingDir = dir)
rstudioapi::jobRunScript(path = "auto_data_prep_v2 - AT.R", name='job2',importEnv = FALSE, workingDir = dir)

Is it feasible in rstudio or console?

any suggestions would be really appreciated

Thanks in advance

Cris

Hi @cristiano74 , welcome to RStudio Community. The easiest way would be to have the script for Job1 to call the script for Job2 as its last line.

thanks @edgararuiz i will try it out!

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.