khi gia

Jul 19, 2008 11:53pm

cronjob on every 3rd Friday of the month

[[ `date “+%u”` == 5 && $(( `date “+%d”` / 7 )) == 2 ]] && do_my_job.sh

Update: this is NOT the 3rd Friday, this is the Friday of the 3rd week!
If you wanna 3rd Friday, simply check date +%u == 5 and 3*7 < date +%d < 4*7

Page 1 of 1