Good Morning,
I have a burning question regarding a particular bash script that I am trying to run. This script is downloading a file, then saving it to another folder. The script will not be running on a cron every single day, and I was curious if there is a way to write it so if I miss say 10 days, it will know to download a textfile from the directory that corresponds with each specific day I missed. I currently am saving a text file of the last current runtime. Here's an example of what I have so far!
#!/bin/bash
YMDa=$(date +%Y%m%d)
echo "${runtime}"
echo "${YMDa}"
wget --username --password http://somewebsite.com
mv nbcufs_master_10day_tmaxs master_10day_tmaxs_${YMDa}
mv master_10day_tmaxs_${YMDa} 'C:\Users\Wiggles\Documents\Microsoft Excel\SubDirectory1\SubDirectory2\SubDirectory3'
echo "${YMDa}" > latest_runtime
exit 0