I'm running a shiny app locally on my Windows machine that auto-runs every day using a batch file. I recently ran into an issue lately where the R tmp directory /tmp/RtmpXXXXX is removed and the application fails:
Warning in file(open = "w+b", encoding = "UTF-8") :
cannot open file
'C:\Users\Carlos\AppData\Local\Temp\Rtmp0maCtT\Rf140c40ab30be': No such file
or directory # deleted file
Warning in normalizePath(path.expand(path), winslash, mustWork) :
path[1]="C:\Users\Carlos\AppData\Local\Temp\Rtmp0maCtT": The system cannot
find the file specified # deleted folder
Warning in file(open = "w+") :
cannot open file
'C:\Users\Carlos\AppData\Local\Temp\Rtmp0maCtT\Rf140c38044f8': No such file
or directory
Warning: Error in file: cannot open the connection # program crashes
Stack trace (innermost first):
1: runApp
Error : cannot open the connection
How should I manage a temporary directory that automatically gets deleted after a certain amount of time? I tried changing the file path to see if that would resolve the issue, but that didn't work.