cancel
Showing results for 
Search instead for 
Did you mean: 

alternate weeks crontab

 
Highlighted
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
Highlighted
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.

Highlighted
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

Highlighted
Super Advisor

Re: alternate weeks crontab

Thank you we will try
Highlighted
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.