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

Re: Cron, > 1 month but < 2 months



On Fri, 9 Mar 2012 12:08:38 +0100, Jochen wrote in message 
<[🔎] 20120309110838.GN11891@wasteland.homelinux.net>:

> 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)?

..or maybe ddate?  Tong, ddate uses 5 "seasons" with 
73 days in each, should fit your purpose:
arnt@nb6:~$ date &&ddate
Fri Mar  9 15:25:34 CET 2012
Today is Pungenday, the 68th day of Chaos in the YOLD 3178
arnt@nb6:~$ ddate 14 3 2012
Pungenday, Chaos 73, 3178 YOLD
arnt@nb6:~$ ddate 15 3 2012
Prickle-Prickle, Discord 1, 3178 YOLD
arnt@nb6:~$ 


-- 
..med vennlig hilsen = with Kind Regards from Arnt Karlsen
...with a number of polar bear hunters in his ancestry...
  Scenarios always come in sets of three: 
  best case, worst case, and just in case.


Reply to: