Operating System - HP-UX
1753599 Members
6517 Online
108796 Solutions
New Discussion

Re: alternate weeks crontab

 
rajesh73
Super Advisor

alternate weeks crontab

I need to run the script in every month first Sunday and last Sunday how to schedule in crontab
4 REPLIES 4
Dennis Handly
Acclaimed Contributor

Re: alternate weeks crontab

In crontab you schedule it EVERY Sunday and in the script you just return if the date isn't in the first or last Sunday range.

Steven Schweda
Honored Contributor

Re: alternate weeks crontab

> In crontab you schedule it EVERY Sunday and in the script you just return if the date isn't in the first or last Sunday range.

 

   You know, much like:

 

http://h30499.www3.hp.com/t5/Languages-and-Scripting/crontab-entry-help/m-p/5629157

rajesh73
Super Advisor

Re: alternate weeks crontab

Thank you we will try
Dennis Handly
Acclaimed Contributor

Re: alternate weeks crontab

>You know, much like:

 

Well, there is one advantage here in that you can check for Sunday in crontab but in the other example it was for everyday except for a few Saturdays.

 

And since you're dealing with "last", you need to know how many days in each month.