From: nkb Date: 2004-10-11T18:26:42+09:00 Subject: Re: Task scheduling using Ruby? Thanks. I downloaded DirectoryWatcher.rb. I copied and pasted the codes under the Example: section (uncommented them) to the end of the DirectoryWatcher.rb. And instead of using 'plugins/devices', I replaced it with 'C:/temp'. I ran DirectoryWatcher.rb at my command prompt on windowsXP. Nothing happens when I change or add files to the C:/temp. What am I missing? Thanks. Hal Fulton wrote on 2004/10/11 17:18: > nkb wrote: > >> Hi. >> I would like to schedule a task (e.g check if a file exists or if the >> date of the files in a diretory are newer than yesterday, etc.) on >> Linux using Ruby. Can this be done, if so how? I supposed I would run >> the script as root background? Thanks for any pointer!! >> > > Gavin Kistner released something two weeks ago that might interest you: > > > http://phrogz.net/RubyLibs/rdoc/classes/Dir/DirectoryWatcher.html > > > > A DirectoryWatcher keeps an eye on a certain directory, firing off > your own custom > procs when a file is added to, modified in, or removed > from that directory. > > > > See the link above for documentation. Download available from > > http://phrogz.net/RubyLibs/DirectoryWatcher.rb > > > If that doesn't get you in the right direction, ask us again... > > > Hal > > > >