[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cron, > 1 month but < 2 months



Florian Ernst:
> Hello there,
> 
> On Fri, Mar 09, 2012 at 05:09:23AM +0000, T o n g wrote:
>> Is there any easy way to schedule a job for a duration that is greater 
>> than one month but shorter than 2 months? Any duration will do, as long 
>> as it is easy to schedule. 
> 
> Easy? Hmmm.
> 
> 0 12 * * 1 [ $(expr $(/bin/date +\%s) / 60 / 60 / 24 / 7 \% 8) -eq 3 ] && myscript

Nice. Is there any reason why you don't use "date '+%V'" (or %W or %U)?

J.
-- 
I start many things but I have yet to finish a single one.
[Agree]   [Disagree]
                 <http://www.slowlydownward.com/NODATA/data_enter2.html>

Attachment: signature.asc
Description: Digital signature


Reply to: