EDIT: I believe I have found the issue, even though its running as Asynchronous both scripts had a for loop both using i as the counter... I changed script two to use z and now I'm not getting the error anymore
I am using system to source a script as an Asynchronous background process
system("C:/PROGRA~1/R/R-34~1.0/bin/Rscript.exe C:/Users/Federico/Documents/R/win-library/3.4/taskscheduleR/extdata/PriceTesting.R",
wait=FALSE, show.output.on.console = F)
This script lasts 12 minutes while the original script that sourced this keeps running 24/7
while the sourced script is running the main script fails for 12 minutes. This is all the information I am retrieving from the error logging.
[1] "error at 2018-03-27 11:02:18 StopIteration TRXBTC"
[1] "error at 2018-03-27 11:03:18 StopIteration TRXBTC"
[1] "error at 2018-03-27 11:04:17 StopIteration TRXBTC"
[1] "error at 2018-03-27 11:05:17 StopIteration TRXBTC"
[1] "error at 2018-03-27 11:06:17 StopIteration TRXBTC"
[1] "error at 2018-03-27 11:07:18 StopIteration TRXBTC"
[1] "error at 2018-03-27 11:08:17 StopIteration TRXBTC"
[1] "error at 2018-03-27 11:09:18 StopIteration TRXBTC"
[1] "error at 2018-03-27 11:10:18 StopIteration TRXBTC"
[1] "error at 2018-03-27 11:11:18 StopIteration TRXBTC"
[1] "error at 2018-03-27 11:12:17 StopIteration TRXBTC"
[1] "error at 2018-03-27 11:13:19 StopIteration TRXBTC"
[1] "error at 2018-03-27 11:14:18 StopIteration TRXBTC"
My only thought is that the second script is being called from a parallel process which the main script later tries to kill (before the 12 minutes are over) Could this be the issue? The second script should be pulled totally separately so why is it effecting my first script?