How to exclude a certain day of the week in cron, and only on a certain week?

You can manually check for it in a script: date "%u gives you the day of the week (same as the dow field in cron) To get the week number of each month, you have to do something funky date +"%V gives you the week of the month, so you'd have to look at x=`date +"%V"` y=`date +"%V" -d $(date +"%Y%m01")` week_of_month=$((x-y)) week_of_month starts at 0 so you would want to check if it is not two So in your cron, you would run the script every friday, and put a check at the top of the script: x=`date +"%V"` y=`date +"%V" -d $(date +"%Y%m01")` week_of_month=$((x-y)) if "$week_of_month" == "2" ; then echo "Will not run second friday of the month" exit; fi.

You can manually check for it in a script: date "%u" gives you the day of the week (same as the dow field in cron) To get the week number of each month, you have to do something funky. Date +"%V" gives you the week of the month, so you'd have to look at x=`date +"%V"` y=`date +"%V" -d $(date +"%Y%m01")` week_of_month=$((x-y)) week_of_month starts at 0 so you would want to check if it is not two. So in your cron, you would run the script every friday, and put a check at the top of the script: x=`date +"%V"` y=`date +"%V" -d $(date +"%Y%m01")` week_of_month=$((x-y)) if "$week_of_month" == "2" ; then echo "Will not run second friday of the month" exit; fi.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions