batch file - Stopping the execution of R script until the data are avaiable -
i trying create 2 windows batch files in r , run them 1 one. these batch jobs export data out of database , rest of r script format exported data used other purposes. issue facing created batch files , ran jobs using shell command. these batch jobs take time complete. while still running, rest of script executed , since doesn't find dataframes (which supposed created result of batch job completion), fails. there way specify in r script should not executed until batch jobs done , data available. since takes different amount of time complete job every time runs, don't want use sleep command. appreciated. thank you!
what checking every second if file batch produces exists
while (!file.exists(destfile)) { sys.sleep(1) }
this way execution stays in while loop till file there. (without needing resources)
Comments
Post a Comment