1

I have scheduled an RScript to run via the TaskScheduler but there seems to be an error occurring in the code which does not occur when I run the code manually.

Is there a way I can output the RScript log into a separate file so I can then debug?

TylerH
  • 20,799
  • 66
  • 75
  • 101
Brad
  • 107
  • 8
  • Is that via the taskschedulerR package? If so, in the [documentation, page 3, Description of the function `taskscheduler_create`](https://cran.r-project.org/web/packages/taskscheduleR/taskscheduleR.pdf): *(...) The rscript file will be scheduled with Rscript.exe and the log of the run will be put in the .log file which can be found in the same directory as the location of the rscript (...)*. – Ramiro Magno Sep 28 '19 at 23:06
  • I was attempting to avoid taskscheduleR package, but these seems to be the best way forward now. However I am receiving a pandoc error 127 when I attempt to use kable to write to a html file. Any solutions for this? – Brad Sep 29 '19 at 13:57
  • I think it's best then to create a new question. And don't forget, always share the underlying code showing the issue. – Ramiro Magno Sep 29 '19 at 14:58
  • You can use `sink` to redirect warnings/messages/errors. If your code does not use `parallel`, it should work well. – Karsten W. Sep 29 '19 at 18:10

0 Answers0