Run command every Sunday after first Friday of each month

There are many ways to achieve that, we will go for easiest one here.

Below script will do the job

#!/bin/sh
#
# day of month as variable
 D=$(date '+%d')
#
# logic
 if [ "$D" -ge 3 ] && [ "$D" -le 9 ]
 then
 echo "Previous Friday was first in month script-true.sh will be run" |logger
\path\to\script-true.sh
#
else
 echo "Previous Friday wasn't first in month script-false will be run" |logger
\path\to\script-false.sh
#
fi

Read More »