date +%s

Sharing a quick hack I use all the time

while :; do
  wget -q -O `date +%s.json` example.com/data.json
  sleep 60
done

Very simple shell hackery to download a URL once a minute and save it in a file named with a timestamp. The only midly subtle thing there is date +%s: that is a date format which is seconds since epoch, which is a conveniently sortable thing for filenames and timestamps and stuff.

(The while : instead of while true is idiosyncratic and anciently historical. In some very bizarre contexts true is the program /bin/true, the : is always a builtin.)

I have a bad habit of leaving scripts like the above running and forgetting about them, only to come back to a directory with 100,000 files in it.