I am trying to set up a cron job, using a script that needs to be occasionally run interactively.
So far it looks like this:
59 1 * * 1 /weekly.csh date +\%Y\%m\%d date +\%Y\%m\%d >> log
What I really want, is for the first date variable to be todays date, minus seven days (ie. last week) and the second variable to remain as is (today's date).
How can I do this??? Any help is much appreciated!!!
11 Answer
You can use
59 1 * * 1 /weekly.csh date +\%Y\%m\%d --date="-1 week" date +\%Y\%m\%d >> log