Closed jonathantaylor7 closed 5 years ago
myscript should be a .R file look to the log in the location of your .R file
Thanks for responding so quickly. I changed all of my files to .R rather than .Rmd and I'm still seeing this issue.
I also looked at the log and this is what I got:
system.file("extdata", "TestEmail.log", package = "taskscheduleR") [1] ""
Readme says
When the task has run, you can look at the log which contains everything from stdout and stderr. The log file is located at the directory where the R script is located.
Makes sense. Missed that one. So now I go into the log file and I'm seeing where it's stopping at:
Loading required package: knitr Loading required package: markdown Error in file(file, ifelse(append, "a", "w")) : cannot open the connection Calls: knit -> cat -> file In addition: Warning message: In file(file, ifelse(append, "a", "w")) : cannot open file 'ExampleRStudioCode.txt': Permission denied Execution halted
Seems to be a permissions issue with the folder I have this file in. Is it maybe something other than that?
Seems to me your own code contains errors. Debug them. This is unrelated to the taskscheduleR package. Please ask such questions related to debugging your own code somewhere else like on stackoverflow.
I'm trying to use RStudio to run an automated email out. I'm using taskscheduleR to do this but it doesn't seem to be working for me. The data code is here: ExampleRStudioCode.rmd
Summary of Car Speed and Distance
Plot of Car Speed and Distance
You can also embed plots, for example:
The email code is here: TestEmail.rmd
The taskscheduleR code is here: AutomatedSend.Rmd
Any ideas why it might not be running? The data and email scripts both run and work. It's just the automation where all I got is a quick flash of a black box and that's it. Hopefully there is an easy fix to this that I am missing.