crontab: setup cronjob to run first wednesday of every month

Hi,

How to setup cronjob to run first wednesday of every month. Is there a way?

Thanks..

As far as I know cron by nature doesn't have such capability ,
You have to work around with some scripting

Yes the is are many...
You can start by selecting the day (Wednesday) and in the script for the job, start by a simple test : is day smaller than 8?

Try this to run wednesday of every month at 9:30 am.Pls reply whether it worked or not

30 09 * * WED your_script.sh

30 09 * * WED your_script.sh

This will run every wednesday of any month. I want cronjob should run on first wednesday only of every month...

Please tell me how?

Already answered...

Or executes all the 1,2,3,4,5,6,7 and test if day is Wednesday...

If you dont know howto write a such simple test, you should have posted to more appropriate forum (dummies)

Can you give the steps of how do it?

That wont work as cronjob will run first 7 days. But I want cronjob to run only once (wed) in a month..

Your cron if you have set on wednesdays will only run all wednesdays, the test is to execute if day is less than 8 (first week), else you execute on the first 7 days of the week and test if day is wednesday

00  5 * * 3          /sm/cron/bin/yourplannedJob

will run every wednesday...
If you test for days less than 8, you are sure to be in the first week of the month