Ruby Event Manager / Scheduler

E

eDreamers

In the scope of a project management tool development, we would need to
create an automated process that would trigger certain actions (read
some ruby code) based on certain dates (as defined by the project).
This would be triggered from the application server in back-end.

I currently have no idea on how to proceed and that's the reason why
I'm posting this message. Any advices, suggestions welcomed.

Thx
 
R

Ryan Leavengood

I have considered writing a cron-like system in pure Ruby, as it would
allow the type of scheduling you are talking about on all platforms in
a consistent manner. At the moment we have cron on Unix systems,
Scheduled Tasks on Windows, etc., all of which operate differently.

I haven't yet created this system, but I have played with some of the
ideas. The way I was going was to have a server process with a thread
that wakes up every 10 seconds or so, checks the date and time against
tasks that need to be run, and any tasks that have "expired" times
would be run in their own threads. It is pretty simple, and a basic
version would be easy to code. The complexity comes when you try to
provide complex scheduling rules (i.e. "run this task M-F at 2AM from
May to September.") But if you just have simple date and time based
scheduling rules, this will be easy.

Ryan
 
J

James Edward Gray II

I have considered writing a cron-like system in pure Ruby, as it would
allow the type of scheduling you are talking about on all platforms in
a consistent manner. At the moment we have cron on Unix systems,
Scheduled Tasks on Windows, etc., all of which operate differently.

Have you seen Daedalus?

http://www.freshports.org/sysutils/daedalus/

James Edward Gray II
 
A

ara.t.howard

I have considered writing a cron-like system in pure Ruby, as it would
allow the type of scheduling you are talking about on all platforms in
a consistent manner. At the moment we have cron on Unix systems,
Scheduled Tasks on Windows, etc., all of which operate differently.

I haven't yet created this system, but I have played with some of the
ideas. The way I was going was to have a server process with a thread
that wakes up every 10 seconds or so, checks the date and time against
tasks that need to be run, and any tasks that have "expired" times
would be run in their own threads. It is pretty simple, and a basic
version would be easy to code. The complexity comes when you try to
provide complex scheduling rules (i.e. "run this task M-F at 2AM from
May to September.") But if you just have simple date and time based
scheduling rules, this will be easy.

this would help

http://runt.rubyforge.org/

-a
--
===============================================================================
| ara [dot] t [dot] howard [at] noaa [dot] gov
| all happiness comes from the desire for others to be happy. all misery
| comes from the desire for oneself to be happy.
| -- bodhicaryavatara
===============================================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,199
Messages
2,571,045
Members
47,643
Latest member
ashutoshjha_1101

Latest Threads

Top