I have a script written in R that collects data from a small group of APIs then writes collected data to a google drive account (using googledrive package).
This script runs without errors in RStudio and command line but, when I attempt to schedule the script to execute daily, I am having issues.
The job is created using the cronr add-in and acknowledges creation of the job:
Listening on http://127.0.0.1:6904
This is not a cron schedule but will launch: nohup /Library/Frameworks/R.framework/Resources/bin/Rscript '/Users/me/app_update_scripts/update_app.R'>> '/Users/me/app_update_scripts/update_app.log' 2>&1 &
So far, I have attempted giving the command sudo cron to make sure I have permissions.
I have directed the Cron job to output to the .log in an attempt to debug but I am given no error messages, just:
Loading required package: xml2
Attaching package: ‘rvest’
The following object is masked from ‘package:purrr’:
pluck
── [1mAttaching packages[22m ───────────────────────────────── tidyverse 1.2.1 ──
[32m✔[39m [34mggplot2[39m 3.2.1 [32m✔[39m [34mreadr [39m 1.3.1
[32m✔[39m [34mtibble [39m 2.1.3 [32m✔[39m [34mdplyr [39m 0.8.3
[32m✔[39m [34mtidyr [39m 1.0.0 [32m✔[39m [34mstringr[39m 1.4.0
[32m✔[39m [34mggplot2[39m 3.2.1 [32m✔[39m [34mforcats[39m 0.4.0
── [1mConflicts[22m ──────────────────────────────────── tidyverse_conflicts() ──
[31m✖[39m [34mdplyr[39m::[32mfilter()[39m masks [34mstats[39m::filter()
[31m✖[39m [34mreadr[39m::[32mguess_encoding()[39m masks [34mrvest[39m::guess_encoding()
[31m✖[39m [34mdplyr[39m::[32mlag()[39m masks [34mstats[39m::lag()
[31m✖[39m [34mrvest[39m::[32mpluck()[39m masks [34mpurrr[39m::pluck()
Attaching package: ‘lubridate’
The following object is masked from ‘package:base’:
date
Execution halted
and will not go past this point or output a clear error. I am operating on a Mac and have recently updated to Mac OS Catalina.