RedditExtractoR Error in R Console, nonetheless no longer in R Studio on same AWS EC2 Server? (Error 429)

Howdy!

I've started to debris around with the usage of [RedditExtractoR](https://github.com/ivan-rivera/RedditExtractoR), which is an R API wrapper outmoded to pickle files from reddit.

I spooled up a fresh t2.micro occasion the usage of the [following tutorial](https://towardsdatascience.com/how-to-bustle-rstudio-on-aws-in-below-3-minutes-for-free-65f8d0b6ccda).

I wrote the following R script:

library("RedditExtractoR")

WSB <- get_reddit(search_terms = NA, regex_filter = "", subreddit = "wallstreetbets",

cn_threshold = 1, page_threshold = 1, sort_by = "comments",

wait_time = 2)

Time <- Sys.time()

Time <- sub(" ", "_", Time)

Time <- sub(":", "_", Time)

Time <- sub(":", "_", Time)

Time <- sub("-", "_", Time)

Time <- sub("-", "_", Time)

filename <- paste0("WSB_",Time, ".csv")

write.csv(WSB, paste0(filename))

I even maintain confirmed that the following code does work while running it in R Studio. On the opposite hand, I wish to position up a cronR job to bustle this code, once per hour, and dump the timestamped CSV to my server. Once I employ the cronR scheduler (which then runs it in native R on the server itself, no longer for the length of the R Studio web interface), I safe the following error from the script log:

Can't join to the gain space, skipping...

Can't join to the gain space, skipping...

Warning messages:

1: In file(con, "r") :

can no longer start URL 'https://www.reddit.com/r/wallstreetbets/fresh.json?sort=comments': HTTP build of living became '429 Unknown Error'

2: In file(con, "r") :

can no longer start URL 'https://www.reddit.com/r/wallstreetbets/fresh.json?sort=comments': HTTP build of living became '429 Unknown Error'

I bear in mind the fact that it's going to also very neatly be associated to too many requests, nonetheless then why does the code enact and work successfully in R Studio when running the code chunk manually (and even doing interior 5 minutes after running the above code by technique of cronR)?

Edit: I tested that cronR works, because it efficiently outputs separate .csv files of random numbers at the scheduled interval.

RedditExtractoR Error in R Console, but not in R Studio on same AWS EC2 Server? (Error 429)