We want to download the stock price of Tesla every day, using the package "quantmod" in R. We managed to write the function that downloads the last available stock and store it in a database in SQL: indeed, if we run the function manually, we can see the table with the stock price of today. However, if we let it run alone with crontab, it doesn't work: we set it up on the 14th, and as of today, it only downloaded the price of the 18th. This is how we set up the crontab:
# m h dom mon dow user1 command
59 23 * * 1-5 /usr/bin/Rscript /home/project/daily.R
Anyone? I'm sure it's a stupid mistake but it doesn't work and I need it to work by the end of the week