Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Task scheduling using Ruby?

Reply
Thread Tools

Task scheduling using Ruby?

 
 
nkb
Guest
Posts: n/a
 
      10-11-2004
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!!


 
Reply With Quote
 
 
 
 
Hal Fulton
Guest
Posts: n/a
 
      10-11-2004
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/clas...ryWatcher.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




 
Reply With Quote
 
 
 
 
nkb
Guest
Posts: n/a
 
      10-11-2004
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/clas...ryWatcher.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
>
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
stop org.jdesktop.application.Task started using @Action public Task Mike Java 1 05-12-2008 12:09 PM
Accessing ant task name when running a task teggy Java 0 05-29-2007 02:20 PM
Looking for task scheduling component... greg@ram-software.com C++ 1 02-20-2007 04:49 PM
Maven using ANT plugin for SCP task : Embedded error: Could not create task or type of type: scp. krabhi Java 1 08-09-2006 04:19 PM
Re: Problem in ant replace task and replaceregexp task to update xml Victor Java 0 09-01-2004 03:58 AM



Advertisments