I have a R program to execute every 2 hours at day time, say between 8:30-18:30. It seems like everything works except there is no option to pause from 18:30 to 8:30 next morning. Please help! Thanks. The code I used to successfully execute every 2 hours is as follows.
library(taskscheduleR)
taskscheduler_create(taskname = "code_hr", rscript =
"C:/Users/me/Documents/code.R",schedule = "HOURLY", starttime = "08:30",
modifier = 2, startdate = format(as.Date("2017-08-14"), "%m/%d/%Y"))
Using taskscheduleR often requires a little editing in Windows Task Scheduler to add more advanced options such as this.
As the first step I typically create the task as best I can with taskscheduleR, like you did. This helps you to get several R-related settings correct.
For the 2nd step do the following:
There's a nice screenshot on a related Super User thread: https://superuser.com/questions/345319/how-to-schedule-a-windows-task-to-repeat-every-day-within-a-time-range
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With