0 votes
1 view
in BI by (13.4k points)

I have written a series of R Scripts that create CSV files. From there, Tableau will read the csv's and update various dashboards. As Tableau can easily be scheduled to update on a daily cadence, I was hoping to do the same with my R Script.

While there are a bunch of answers already with solutions for Windows, there hasn't been a solution posted for OSX. I have looked into trying to run my script in Terminal and use Automator to do it, but couldn't quite figure it out. Basically, when the shell script runs it terminates midway through because there are errors in the R Script - but I do not care about the errors. The Automator didn't work as well.

Additionally, I also looked into Data Integration/Pentaho but the additional software configuration and the subsequent installation seemed difficult.

Any help or insight would be greatly appreciated! Thanks!

1 Answer

0 votes
by (36.7k points)
  • Type crontab -e and add this line to the resulting file

@daily Rscript 1.R && Rscript 2.R

  • At midnight every day, it will run the files 1.R, followed by 2.R.

...