0

I need to download a copy of an XML file as per this question answered Download online XML file using cron

As an example:

0 13 * * *  wget -O /home/html/myname/xmldownloads/ http://somedomain.com/somexmlfile.xml

However I need to run the cron command in such a way that the downloaded file is given a different filename each time so that it is not overwritten. (ideally appended with the date)

Is this even possible? Thanks

Matt
  • 413
  • 1
  • 5
  • 12

1 Answers1

0

I have found a better solution. To create multiple cron jobs with different filenames in the local download folder.

Matt
  • 413
  • 1
  • 5
  • 12
  • 1
    Do you mean adding 365 lines every year (366 if lap year)? – Álvaro González Jan 09 '22 at 18:36
  • @Álvaro González no I just needed to rotate 3 files and compare them with each other sequentially before the next batch the next day. My solution is now adequate. I’ll mark this as resolved when I can – Matt Jan 10 '22 at 20:02