bnosac / taskscheduleR

Schedule R scripts/processes with the Windows task scheduler.
331 stars 72 forks source link

scripts with source() function #65

Closed Edgar-Ventura closed 5 years ago

Edgar-Ventura commented 5 years ago

I am trying to schedule daily running of one script. However, it requires a few other scripts to be run throughout the script itself. This is accomplished through source() and changing the wd() to and back from the sourced script.

I keep getting errors when I try to automate this and the task cannot connect to any of the source() files. Is this incompatible with taskscheduleR?

jwijffels commented 5 years ago

You need to provide the full path to the file when you use source, not a relative path with respect to the current working directory as when you schedule a script, the working directory will be different than in an R project. Did you provide the full path to that .R file in source?