On 9/16/07, pimpmaster <[EMAIL PROTECTED]> wrote:
>
> and have a scheduler work off these fields somehow

Hi Steven,

seems like you are interested in help about the OpenWFEru scheduler
and not the OpenWFEru workflow / bpm engine.

Let's assume you have a scheduler set up and started in your
config/environment.rb (I am also assuming you are using Ruby on
Rails).


Scenario 1 (status field) :

$scheduler.schedule "0 12 * * *" do
    Album.find_all_by_status(3).each do |album|
        send_mail_to_subscribers(album)
        album.status = 4
        album.save!
    end
end


Scenario 2 (release date) :

$scheduler.schedule "0 12 * * *" do
    Album.find_all_by_release_on(today()).each do |album|
        send_mail_to_subscribers(album)
    end
end


Beware if you have multiple Rails instance of the same application :
http://groups.google.com/group/openwferu-users/browse_frm/thread/d54c7ba1052c818e
http://groups.google.com/group/openwferu-users/browse_frm/thread/b7726cab451d2450/#

Only one of them should do the scheduling.


Hope this helps, best regards,

-- 
John Mettraux   -///-   http://jmettraux.openwfe.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenWFEru users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to