From: "Kyrre Nygård" Date: 2007-08-16T06:29:34+09:00 Subject: Re: Any Muslims around? --Boundary_(ID_3pXpStUQVZA5x07/pZq3DQ) Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT John Mettraux wrote: > On 8/14/07, Ronald Fischer wrote: > >>> Just wondering if any Muslims have gotten around to making a >>> Ruby script >>> that like plays a sound or something when it's time for prayer. >>> >> I guess time for prayer is at certain times per day? You could >> get the current time with Time.now, then sleep the appropriate >> time to the next prayer, and then wake up and to whatever you >> would like to do. >> > > Hi, > > you could also have a look at : > > http://openwferu.rubyforge.org/scheduler.html > > > to install it : > > sudo gem install openwferu-scheduler > > > then write a program that looks like : > > ---8<--- > > require 'rubygems' > require 'openwfe/util/scheduler' > > include OpenWFE > > scheduler = Scheduler.new > scheduler.start > > scheduler.schedule("0 6 * * *") do > puts "time for the morning prayer" > end > scheduler.schedule("0 12 * * *") do > puts "time for the noon prayer" > end > > # or > > scheduler.schedule("0 6,8,12,16,18 * * *") do > puts "bismillah..." > end > --->8--- > > The scheduler follows the "cron" convention > (http://www.google.com/search?q=man%205%20crontab) > > Maybe you're better off with a ruby program triggered by the cron in > your system (if it's a Unix / MacOSX one). > > > Best regards, > > Some awesome suggestions here, but I think it's a bit more complex considering how times vary from location to location. I guess I'll have to try to make sense out of http://www.arabeyes.org/project.php?proj=ITL. As I said though, I'll report back to base once I got something. Thanks again guys! All the best, Kyrre --Boundary_(ID_3pXpStUQVZA5x07/pZq3DQ)--