I am attempting to open a url and close a url in an effort to fool my virtual machine into thinking I am working. I work in R with linx os. So I need it to open a browser wait a minute and close the browser. my code so far:
repeat{
startTime <- Sys.time()
site <- browseURL("https://youtu.be/_W0bSen8Qjg")
#does not work
open(site)
sleepTime <- startTime + 20 *60*60*60 -Sys.time()
#does not work
close(site)
if (sleepTime >0)
Sys.sleep(sleepTime)
}
I can not figure out how to make the browser close. Any thoughts or ideas would be helpful .