I'm running an R 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
I ran procmon and noticed that Disk Cleanup was removing temporary files automatically almost every day, causing the app to crash. I unchecked the settings in the dialog box, but this doesn't seem to have changed anything. Is there any other way to disable cleanmgr.exe
from running automatically?