Is there anything in GNU Make that allows for dependency on date and/or time?
Currently I have a Makefile that checks whether or not to download the latest financial data. The target is something like stock_symbol.csv, and the important dependency is a a file called last_updated.txt. last_updated.txt changes once a day, and when it does, make will know to refresh my historical data.
The annoying thing is that I have to change this finally manually, or let some other program (e.g. cron) modify it on a schedule. I'm wondering if there's a way to remove the need for external programs here. Does Make have anything that will achieve this?
This is my present Makefile
.PHONY : run
run :
R --quiet -e "shiny::runApp(launch.browser=TRUE)"
# update model
model.RData: model.R data/vix.csv
Rscript fit_model.R
# update data
data/vix.csv: last_updated.txt update_csv.R
Rscript update_csv.R
## remove all target, output and extraneous files
.PHONY: cleanall
cleanall:
rm -f *~ *.Rout *.RData *.docx *.pdf *.html *-syntax.R *.RData