2010/1/18 geoffrey mendelson <geoffreymendel...@gmail.com>: > > On Jan 17, 2010, at 3:58 PM, sammy ominsky wrote: > >> On 17/01/2010, at 15:32, ik wrote: >> >>> But for that you need to know when is the shabat enter a specific >>> location, >>> so you need extra program for it (even if it's pure bash), to calculate >>> the >>> exact time it started. I think that the berkley should have the exact >>> time >>> and date for each week for that. >>> I agree that you can execute it like so, but it requires a bit more work >>> then what you are pointing out imho. >> >> Hebcal gives me the date and time for candle lighting and havdala like so: >> >> sa...@zeraim:~$ hebcal -C jerusalem -cerm 42 >> 1.1.2010 Candle lighting: 4:06 >> 2.1.2010 Havdalah (42 min): 5:28 >> 8.1.2010 Candle lighting: 4:11 >> 9.1.2010 Havdalah (42 min): 5:34 >> >> (42 minutes for havdala, default is 72) >> >> etc... for the whole year. You can also get a specific date. I haven't >> yet figured out how to get it to give me "this week", but simple enough to >> parse the date out of the output. >> >> http://linux.softpedia.com/get/Utilities/Hebcal-10219.shtml > > > > Not quite in the same context but this works for me: > > #!/usr/bin/perl > > $today=`date -d "next friday" +"%m %d %Y"`; > #printf("%s\n",$today); > $candles = `hebcal -c -o -Z israel -C Jerusalem $today`; > printf("%s\n",$candles); > > $tomorrow=`date --date="next saturday" +"%m %d %Y"`; > #printf("%s\n",$tomorrow); > $havdala = `hebcal -c -o -m 38 -Z israel -C Jerusalem $tomorrow`; > printf("%s\n",$havdala); > > Geoff.
I don't know what the output looks like but to cover the last gap in the chain - feed the time to a couple of "at" commands (not cron) to set the flag using the commands Tsafrir showed earlier. You can even pre-set the "at" queue for a full year if you like...:) --Amos _______________________________________________ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il