/build/static/layout/Breadcrumb_cap_w.png

Unix Crontab - Please help. Patching Question

I am trying to create a custom Patch Schedule with unix contab. I have two patching jobs. The first job I want to run every other Tuesday at 10:20a ( We will say the 1st and 3rd Tuesday). The second job i want to run at 10:20a every other Tuesday, except the other two Tuesdays. (The 2nd and the 4th Tuesday) Is this possible and if so can someone please assist. 

 

The schudle is much complex then what I have listed above but if someone can help me figure this out I should be able to figure out the rest.  So as follows

Week One - Patch Job One - Tuesday @ 10:20a

Week Two - Patch Job Two - Tuesday @ 10:20a

and then repeat. 

 


0 Comments   [ + ] Show comments

Answers (1)

Posted by: BHC-Austin 10 years ago
4th Degree Black Belt
0

I believe you could use something like the following:

20 10 * * TUE#1,TUE#3 PatchJob1.sh

20 10 * * TUE#2,TUE#4 PatchJob2.sh

In the day of week field, you can specify days by name and using # can specify which week of the month (i.e. TUE#1 = 1st Tuesday). This all depends on what version of cron and what extensions were compiled in, but afaik those are pretty standard extensions.

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ