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.
Asked
Active
Viewed 1,016 times
0
-
Hi please have look this link hope this will help.https://stackoverflow.com/questions/2793389/scheduling-r-script – Tushar Lad Mar 31 '20 at 12:15
-
Which operating system are you using? – Len Greski Apr 01 '20 at 00:49
-
@LenGreski.. windows 10 – Udit Prakash Apr 06 '20 at 14:44
1 Answers
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.
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