crontab: setup cronjob to run first wednesday of every month


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting crontab: setup cronjob to run first wednesday of every month
# 1  
Old 08-17-2011
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..
# 2  
Old 08-17-2011
As far as I know cron by nature doesn't have such capability ,
You have to work around with some scripting
# 3  
Old 08-17-2011
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?
# 4  
Old 08-17-2011
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
# 5  
Old 08-17-2011
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?
# 6  
Old 08-17-2011
Already answered...
# 7  
Old 08-17-2011
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)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Schedule a shell script without crontab every Wednesday at 10 AM

HI Guys I need one shell script to be scheduled to run one shell script to be executed automatically every Wednesday at 10 AM Without crontab and "at" command.. Could you provide your suggestions ? Thanks and Regards kshitij Kulshreshtha (6 Replies)
Discussion started by: kshitij
6 Replies

2. Shell Programming and Scripting

How to setup cronjob 3rd sunday of every month?

Hi All, I need to set up cronjob for every third sunday of the month. here i have seen one example for 4th sunday for every month in another post and it looks perfect.can anyone please help me to understand this and help me to get the setup for third sunday of every month.Thanks. this is... (7 Replies)
Discussion started by: netdbaind
7 Replies

3. UNIX for Dummies Questions & Answers

How to create a cronjob for the 3rd business day of every month?

Hello, Can you please help me out in creating a cronjob that runs every 3rd business day of the month. Thanks (2 Replies)
Discussion started by: AReddy
2 Replies

4. Shell Programming and Scripting

Cronjob not working from user's crontab

Hi All, I am trying to execute a python script from a user's crontab. /home/user1/UDE/scripts/UdeManager.py I am at /home/user1. If I run the command "/home/user1UDE/scripts/UdeManager.py" from the users home directory its working fine. But when I try to run from user's cron tab its... (3 Replies)
Discussion started by: Tuxidow
3 Replies

5. UNIX for Dummies Questions & Answers

How to Set up a cronjob On 4th Sunday of every Month?

How to Set up a cronjob which will run On 4th Sunday of every Month at 8:00 PM :( (11 Replies)
Discussion started by: tp2115
11 Replies

6. AIX

My script didn't run every run every minute at cronjob

In my cronjob, I would like to schedule my script.sh to run every minutes. I crontab -e and have in line below but it didn't seems to run at all. * * * * * script.sh When I run it manually, I can run it. Is that anything wrong with the above line? If I change it to something like below,... (4 Replies)
Discussion started by: ngaisteve1
4 Replies

7. Solaris

crontab entry to run a script on 1st of every month.

What should be the crontab entry in solaris to run a script on 1st of every month? Is this correct? 00 02 1 * * <script to be executed> (5 Replies)
Discussion started by: deepaksahni0109
5 Replies

8. Shell Programming and Scripting

crontab entry to run every last day of the month

i've created a script which should run every last day of the month. what would be the exact crontab entry for this? thanks! (9 Replies)
Discussion started by: tads98
9 Replies

9. Shell Programming and Scripting

Cronjob Crontab Cron Restarter Help

Hello. I'd like to know how to make a simple restarter using cron. I made something like this: "* * * * * root home/..(full path)/file" But it doesn't work. How can I do that or how to make restarter of the application in other way? (1 Reply)
Discussion started by: ArtuDitu
1 Replies

10. Shell Programming and Scripting

Cron to schedule 1st Wednesday of every Month??

Is there a way to use cron to run a job on the 1st Wednesday of every month?? The more generic question is, "Are all of the fields in crontab AND'd together or are some OR'd?". i.e. I had an entry in my crontab this morning as follows and I didn't expect it to run since the day of month is 20... (5 Replies)
Discussion started by: bradtri
5 Replies
Login or Register to Ask a Question