Hi all. I have a script to download a file:
url <- "https://www.somedomain.com/Content.88007/tkExcelResults?idQuery=1" destfile <- "/Users/joseperez/Desktop/22-08-2023.xlsx" download.file(url, destfile)
All OK for now. Now I want to automate the process of downloading this file every day.
file <- "myscript.R" cmd <- cron_rscript(file) cron_add(command = cmd, frequency = 'daily', id = 'test', at = '00:00', description = 'download file', tags = c('lab', 'xyz'))
Now, how can I name the file with the date it was created and not have to enter it manually every day (as in the first step)? I hope I have explained correctly.