I am trying to use the R's taskscheduleR
package to download data using a script every tenth of a minute (every 6 seconds). To do this, I have a script named getwmatadata.R
which downloads data from an API and I am trying to call this script using taskscheduleR
based on the following link: https://github.com/bnosac/taskscheduleR
However, my script below is not working because I get an error saying
Error in taskscheduler_create(taskname = "wmatadata", rscript = wmatapinger, :
File does not exist
Below is how I'm trying to run taskscheduleR
:
library(taskscheduleR)
wmatapinger <- system.file("extdata", "getwmatadata.R", package = "taskscheduleR")
taskscheduler_create(taskname = "wmatadata", rscript = wmatapinger, schedule = "MINUTE", starttime = "05:00", modifier = 0.1)
One possible solution and easy to implement -