Project

General

Profile

Best way of making redmine cron

Added by Jacky Leung almost 14 years ago

I just made a plugin that send email to assigned developer email with batch of tickets number with URL base on Query criteria (e.g. Notification of issue on production and it is not marked as Tested and Resolved)

So I have the redmine plugin that define query in redmine web GUI, and I want to create cron that will automatically execute the following codes.

reminders = Reminder.find(:all)
reminders.each do |reminder|
  reminder.notify_all
end

In this case, what is the best way of the implementation? is it rakefile? or REST API as shown in Rest_api_with_ruby ?

Thanks for all helps


Replies (2)

RE: Best way of making redmine cron - Added by Felix Schäfer almost 14 years ago

Jacky Leung wrote:

In this case, what is the best way of the implementation? is it rakefile? or REST API as shown in Rest_api_with_ruby ?

Rakefile: pro: easy because you can pretty much copy the existing ones, and you don't occupy one of your web-facing threads, con: loads a whole rails environment for itself.

API: pro: quite easy too because you just need to curl your action, and you won't need to spin up an extra rails env just for that, con: occupies one web-facing connection, and you need to make sure the authorizations for your API is right.

    (1-2/2)