Need to add a cron entry which should execute on every Monday of month.
Or
You can use it for any other day (changing "Mon" with other days")
00 04 1-7 * * [ "$(date '+\%a')" == "Mon" ] && perl /home/bhagwat/cron/my_script.pl
00 04 8-15 * * [ "$(date '+\%a')" == "Mon" ] && perl /home/bhagwat/cron/my_script.pl
00 04 24-31 * * [ "$(date '+\%a')" == "Mon" ] && perl /home/bhagwat/cron/my_script.pl
Or
You can use it for any other day (changing "Mon" with other days")
00 04 1-7 * * [ "$(date '+\%a')" == "Mon" ] && perl /home/bhagwat/cron/my_script.pl
00 04 8-15 * * [ "$(date '+\%a')" == "Mon" ] && perl /home/bhagwat/cron/my_script.pl
00 04 24-31 * * [ "$(date '+\%a')" == "Mon" ] && perl /home/bhagwat/cron/my_script.pl
No comments:
Post a Comment