0

I am trying to automate my script. Essentially a web scraping script (with Selenium) that loads a csv at the beginning and overwrite it at the end. This should happen every hour. To do this I use the taskscheduleR library.

Below I report the automation code, it is a test set to 5 minutes.

library(taskscheduleR)


x = "C:/Users/STEFANO MARIA/Desktop/Beatiful Data.R"
taskscheduler_create(taskname = "MyBeatifulScript", rscript = x, 
                     schedule = "MINUTE", starttime ="16:30" , modifier = 5 )


taskscheduler_delete(taskname = "MyEspriScript")

The problem is that after turning correctly the first time it freezes. Specifically in Windows Task Manger I have located two processes (Java (TM) Platform SE Binary and Open JDK Platform Binary) that if canceled the automation process resumes correctly.

Since I don't know what these two processes are for and since this is my script that I am trying to automate, I humbly ask for your help.

TylerH
  • 20,799
  • 66
  • 75
  • 101
  • 1
    Not sure how to address this issue, but I had similar problems. Whenever I now want to automate a script I create a batch file of the script and then run that batch file with windows task manager rather than use the taskscheduler in R. Maybe it helps, works fine for me – BillyBouw Nov 05 '21 at 16:57
  • If you're familiar with linux, another alternative to windows task scheduler might be to use ``crontab`` in ``WSL``. After setting up the job under ``WSL``, it is then enough to make sure that both the WSL and the ``cron`` service always starts after boot of the machine, for which there are numerous guides. – runr Nov 08 '21 at 00:14

0 Answers0