[R] Cant schedule R job using taskscheduleR
Christofer Bogaso
bog@@o@chri@tofer @ending from gm@il@com
Fri Aug 24 15:12:16 CEST 2018
Hi,
I am trying to schedule an R job using taskscheduler_create() function
available in package taskscheduleR.
Below is my code:
> library(taskscheduleR)
Warning message:
package ‘taskscheduleR’ was built under R version 3.5.1
> taskscheduler_create(taskname = "ABC", rscript = paste("C:\\ABC.R"),
startdate = format(Sys.Date() + 1, "%d/%m/%Y"), schedule = "WEEKLY",
starttime = "16:30", days = c("MON", "TUE", "WED", "THU", "FRI")[1])
[1] "ERROR: Incorrect Start Date."
attr(,"status")
[1] 16389
Warning message:
In system(cmd, intern = TRUE) :
running command 'schtasks /Create /TN "ABC" /TR "cmd /c
C:/PROGRA~1/R/R-35~1.0/bin/Rscript.exe \"C:\ABC.R\" >> \"C:\ABC.log\"
2>&1" /SC WEEKLY /ST 16:30 /SD "25/08/2018" /D MON ' had status 16389
However it fails with stating Incorrect Start Date.
Any help to understand what went wrong?
I am using R in Windows. Below is Session Information :
> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United
States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C
LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] taskscheduleR_1.1
loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0 data.table_1.11.4
[[alternative HTML version deleted]]
More information about the R-help
mailing list