No additional script needed. You can use "date" to retrieve the date
or just about anything you like. Example:
set $(/bin/date '+ %a %u %e %b %H %M %U')
_weekday=$1 # get week day (Mon, Tue,...) %a
_day_in_week=$2 # 1-7 (mon,...sun) %u
_day_in_mo=$3 # 1-31 (day in the month) %e
_mo=$4 # month (Jan, Feb,...) %b
_hr=$5 # hour (0..23) %H
_min=$6 # minute (1...59) %M
_wk=$7 # week number of year with Sunday as first day (00..53) %U
Need last day of month,
set $(cal);shift $(( $# - 1))
_last_day=$1
If you just want to run in the first three weeks, then put something
like this at the top of your cron job/scrip.
if [ $_day_in_mo -gt 22 ] ; then
exit 0
fi