0

I have multiple scripts naming R001.r, R002.r, and so on. I need to schedule them so that they run in a sequential manner one after the other. What would be the best approach to do this.

Phil
  • 7,287
  • 3
  • 36
  • 66

1 Answers1

1

I think you want to wrap your r scripts in a caller sh file and then invoke it through terminal. Here is what I would do.

  1. Open up a terminal or any text editor available and fill it up with the following commands:

    Rscript R0001.r
    Rscript R0002.r
    Rscript R0003.r
    ...

Save this file into something like call_my_scripts. You can then execute it via standard unix shell commands as follows:

./call_my_scripts

This will run sequentially by definition. Make sure you give exec permissions to the file before you invoke it as follows:

chmod u+x call_my_scripts

Francesco Grossetti
  • 1,555
  • 9
  • 17