Reputation: 31
I am currently trying to use tasks scheduler to upload csv file into googledrive in R for me. But task scheduler cannot make it because it need my authentication of googledrive in web browser. Is there any way for me to avoid authentication by web browser so task scheduler can automatically run the R script and upload the file to googledrive for me?
There is a .httr-oauth in the the folder where I put my script in.
Some codes:
ttt <- drive_auth()
saveRDS(ttt, "C:/Users/DESKTOP/Documents/check/ttt.rds")
drive_auth("C:/Users/DESKTOP/Documents/check/ttt.rds")
drive_upload(path, path = as_id("https://drive.google.com/drive/u/0/folders/1k2H...)
could anyone help me to solve this issue and help me use task scheduler automatically upload the googledrive without authentication using web browser ever time
Upvotes: 2
Views: 2163
Reputation: 973
you can use rclone to upload the file
just use R's system() function in order to pass the correct command line
Upvotes: 0