Honored Contributor Honored Contributor
Re: cron
Hi Jerry,

It cannot be done by default with cron. However, you can add that logic into your script to see if this day is first saturday and exit if not. Attached is a script that is to be prefixed to your orignal script. This checks if today is the day you specified via arguments. For ex.,

$./croncheck.sh 1 2
Usage ./ck.cron: Week Weekday
Example: ./ck.cron 1 Fri - for first friday
Your schedule is error
$./croncheck 1 sat
Your schedule is notok
$./croncheck 1 fri
Your schedule is ok

Edit the script and put exit instead of echoing MYSCHEDULE>

Run the whole script (this script + your script) on every saturday with the arguments 'croncheck 1 sat'. It will exit on all other saturdays except first saturday.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try