开发者

What's the best way to schedule and execute jruby scripts from within a Rails Three Application

I'm working on a rails application that will require a script scheduling and executing component. I have a variety of开发者_如何转开发 scripts that will have to be scheduled and run throughout any given day. Most of the scripts will complete a task and then insert data into a table within the Rails 3 application. I have both Ruby and JRuby scripts to schedule and run. Given these requirements does anyone have any thoughts on a approach to accomplish this. Also, ideally the scripts would run in the background.

Thanks.


Maybe this is the old-fashioned approach but how about script/runner kicked off by cron?


I've been using rufus-scheduler to run daily scripts from within a jruby application. My understanding is that it runs periodically using threads, which can be unreliable on regular implementations of Ruby. Since JRuby uses regular Java threads you should be OK.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜