I''m developing an application using RoR that will generate enough email notifications that I don''t want them in the actual web application. So, I''m thinking about having an outgoing queue that a cron job would pick up and deliver. My question is if this is possible with a ruby script that uses ActiveRecord and ActiveMailer? _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Matt Pantana <matt.pantana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:> So, I''m thinking about having an outgoing queue that a cron job > would pick up and deliver. My question is if this is possible with a > ruby script that uses ActiveRecord and ActiveMailer?./script/runner -- Doug Alcorn - http://lathi.net/RubyOnRailsDeveloper doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org
Thanks Doug. Just one more question, how does it work? On 9/14/05, Doug Alcorn <doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org> wrote:> > Matt Pantana <matt.pantana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > > > So, I''m thinking about having an outgoing queue that a cron job > > would pick up and deliver. My question is if this is possible with a > > ruby script that uses ActiveRecord and ActiveMailer? > > ./script/runner > > -- > Doug Alcorn - http://lathi.net/RubyOnRailsDeveloper > doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On Thu, 15 Sep 2005, Matt Pantana wrote:> Thanks Doug. Just one more question, how does it work?Another question might be "which MTA are you using?" You may be able to use Batched SMTP. Maybe LMTP (RFC2033) would be of use, though it seems less so. Hugh
Doug Alcorn
2005-Sep-15 13:51 UTC
Use the Wiki, that''s what it''s there for (Was: Sending Emails via Cron)
Matt Pantana <matt.pantana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:> Thanks Doug. Just one more question, how does it work? > > On 9/14/05, Doug Alcorn <doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org> wrote: >> >> Matt Pantana <matt.pantana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: >> >> > So, I''m thinking about having an outgoing queue that a cron job >> > would pick up and deliver. My question is if this is possible with a >> > ruby script that uses ActiveRecord and ActiveMailer? >> >> ./script/runnerI don''t mean to be a jerk, but this stuff is pretty easy to find out with a little research. I mentioned the script/runner to point you in the right direction. A very simple search on the wiki for ''script/runner'' turns up four pages; one of which is "How to Run Background Jobs in Rails". That page has good documentation on it. I''m not just picking on Matt, here. I''d have thought a progressive bunch of Rails coders would understand the value of our wiki. A lot of people spend a lot of time documenting how they use Rails and how it works. The wiki isn''t API docs. It''s real world, rubber meets the road, getting it done docs. It''s true, I wish the search was a little better. That''s why I gave you the right search term to use. I think there''s been talk of doing search differently. I hope we can get to a simple "AND all these words together" search and then have an advanced search page as well. On a related note, creating new pages is easy if not obviously documented. Start by editing some page that you think should refer to your new page. At the very bottom of the edit page is this documentation: ,----[ WikiWords ] | Two or more uppercase words stuck together (camel case) or any | phrase surrounded by doubble brackets is a wiki word. A camel-case | wiki word can be escaped by putting \ in front of it. | | Wiki words: HomePage, ThreeWordsTogether, [[C++]], [[Let''s play again!]] | Not wiki words: IBM, School `---- So, just create a wiki word for your new page. When you save the page you''re editing there will be a link to the not-yet-created page. Click on that link and create away! -- Doug Alcorn - http://lathi.net/RubyOnRailsDeveloper doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org
2005/9/15, Matt Pantana <matt.pantana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> Thanks Doug. Just one more question, how does it work?Check this out: http://wiki.rubyonrails.com/rails/show/Environments#script regards, oliver
Matt Pantana
2005-Sep-15 14:10 UTC
Re: Use the Wiki, that''s what it''s there for (Was: Sending Emails via Cron)
I somewhat agree, in that, by time you had replied, I had already found the answer. Which of course led to more questions. The real question becomes, at what point is it acceptable to submit a question to the community via email list vs. figuring it out yourself. I have no doubt that given enough time, I could figure out almost every question I have regarding rails and/or ruby through search/trial/error/search/trial/error/etc. I feel that way with just about any language. But what is the purpose of the list if I can''t expedite the answer to my question by getting a more specific answer from an individual. And I''m not trying to be a jerk either, but if it bothers you to answer the question...don''t answer it. I''m not trying to dispute that the value of the info in the Wikis, simply that by apperances, this list is for exactly the type of question I submitted. If it is not, my apologies, and maybe it should be articulated what this list *is* for. On 9/15/05, Doug Alcorn <doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org> wrote:> > Matt Pantana <matt.pantana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > > > Thanks Doug. Just one more question, how does it work? > > > > On 9/14/05, Doug Alcorn <doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org> wrote: > >> > >> Matt Pantana <matt.pantana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > >> > >> > So, I''m thinking about having an outgoing queue that a cron job > >> > would pick up and deliver. My question is if this is possible with a > >> > ruby script that uses ActiveRecord and ActiveMailer? > >> > >> ./script/runner > > I don''t mean to be a jerk, but this stuff is pretty easy to find out > with a little research. I mentioned the script/runner to point you in > the right direction. A very simple search on the wiki for > ''script/runner'' turns up four pages; one of which is "How to Run > Background Jobs in Rails". That page has good documentation on it. > > I''m not just picking on Matt, here. I''d have thought a progressive > bunch of Rails coders would understand the value of our wiki. A lot > of people spend a lot of time documenting how they use Rails and how > it works. The wiki isn''t API docs. It''s real world, rubber meets the > road, getting it done docs. > > It''s true, I wish the search was a little better. That''s why I gave > you the right search term to use. I think there''s been talk of doing > search differently. I hope we can get to a simple "AND all these > words together" search and then have an advanced search page as well. > > On a related note, creating new pages is easy if not obviously > documented. Start by editing some page that you think should refer to > your new page. At the very bottom of the edit page is this > documentation: > > ,----[ WikiWords ] > | Two or more uppercase words stuck together (camel case) or any > | phrase surrounded by doubble brackets is a wiki word. A camel-case > | wiki word can be escaped by putting \ in front of it. > | > | Wiki words: HomePage, ThreeWordsTogether, [[C++]], [[Let''s play again!]] > | Not wiki words: IBM, School > `---- > > So, just create a wiki word for your new page. When you save the page > you''re editing there will be a link to the not-yet-created page. > Click on that link and create away! > -- > Doug Alcorn - http://lathi.net/RubyOnRailsDeveloper > doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Matt Pantana <matt.pantana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:> The real question becomes, at what point is it acceptable to submit > a question to the community via email list vs. figuring it out > yourself. I have no doubt that given enough time, I could figure out > almost every question I have regarding rails and/or ruby through > search/trial/error/search/trial/error/etc. I feel that way with just > about any language. But what is the purpose of the list if I can''t > expedite the answer to my question by getting a more specific answer > from an individual. And I''m not trying to be a jerk either, but if > it bothers you to answer the question...don''t answer it.Yes, I agree the purpose of the list is to expedite finding answers to your questions. It''s also to discuss higher level things like strategies, best practices and such. I don''t expect everyone to find out everything for themselves. I do expect people to spend some time finding the answer for themselves. Is ten minutes research too much to ask before posting to the mailing list? I don''t think so. In this specific instance, rather than tersely replying to your original post I should have said, "You should look into using script/runner. There''s docs on the wiki". I replied with my "Use the wiki..." post because I felt like you were wanting me to spoon feed you answers that were already available. I don''t want people to be afraid of posting "too easy" questions to the list or not posting for fear of being flamed. I''d just like a little evidence of self-help before you post here. The mailing list isn''t an interactive wiki. The wiki is the wiki. The mailing list isn''t Google. Google is Google. All three tools are good for solving problems. -- Doug Alcorn - http://lathi.net/RubyOnRailsDeveloper doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org
Joe Martinez
2005-Sep-15 15:18 UTC
Re: Use the Wiki, that''s what it''s there for (Was: Sending Emails via Cron)
Matt, I think Doug is suggesting you pour through 15 pages of a google search to try and answer _all_ you questions yourself; but instead try the doc, the wiki, and maybe the first couple of pages of google search to see if you can find your answer. If you set this up to run as multi in slickrun(on windows) or something similar you can do it in less than sixty seconds. If no one ever checked the wiki or docs then theres a) no point in all the great articles there that people spent time to create and b) this list which will become cluttered to the point of uselessness with the most trivial questions like default routes or something. Also, for more immediate responses there is an irc channel, #rubyonrails, on irc.freenode.net <http://irc.freenode.net> which is always filled with *brillant* people. Hope this helps. On 9/15/05, Matt Pantana <matt.pantana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I somewhat agree, in that, by time you had replied, I had already found > the answer. Which of course led to more questions. The real question > becomes, at what point is it acceptable to submit a question to the > community via email list vs. figuring it out yourself. I have no doubt that > given enough time, I could figure out almost every question I have regarding > rails and/or ruby through search/trial/error/search/trial/error/etc. I feel > that way with just about any language. But what is the purpose of the list > if I can''t expedite the answer to my question by getting a more specific > answer from an individual. And I''m not trying to be a jerk either, but if it > bothers you to answer the question...don''t answer it. I''m not trying to > dispute that the value of the info in the Wikis, simply that by apperances, > this list is for exactly the type of question I submitted. If it is not, my > apologies, and maybe it should be articulated what this list *is* for. > > On 9/15/05, Doug Alcorn <doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org> wrote: > > > > Matt Pantana <matt.pantana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > > > > > Thanks Doug. Just one more question, how does it work? > > > > > > On 9/14/05, Doug Alcorn <doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org> wrote: > > >> > > >> Matt Pantana <matt.pantana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > > >> > > >> > So, I''m thinking about having an outgoing queue that a cron job > > >> > would pick up and deliver. My question is if this is possible with > > a > > >> > ruby script that uses ActiveRecord and ActiveMailer? > > >> > > >> ./script/runner > > > > I don''t mean to be a jerk, but this stuff is pretty easy to find out > > with a little research. I mentioned the script/runner to point you in > > the right direction. A very simple search on the wiki for > > ''script/runner'' turns up four pages; one of which is "How to Run > > Background Jobs in Rails". That page has good documentation on it. > > > > I''m not just picking on Matt, here. I''d have thought a progressive > > bunch of Rails coders would understand the value of our wiki. A lot > > of people spend a lot of time documenting how they use Rails and how > > it works. The wiki isn''t API docs. It''s real world, rubber meets the > > road, getting it done docs. > > > > It''s true, I wish the search was a little better. That''s why I gave > > you the right search term to use. I think there''s been talk of doing > > search differently. I hope we can get to a simple "AND all these > > words together" search and then have an advanced search page as well. > > > > On a related note, creating new pages is easy if not obviously > > documented. Start by editing some page that you think should refer to > > your new page. At the very bottom of the edit page is this > > documentation: > > > > ,----[ WikiWords ] > > | Two or more uppercase words stuck together (camel case) or any > > | phrase surrounded by doubble brackets is a wiki word. A camel-case > > | wiki word can be escaped by putting \ in front of it. > > | > > | Wiki words: HomePage, ThreeWordsTogether, [[C++]], [[Let''s play > > again!]] > > | Not wiki words: IBM, School > > `---- > > > > So, just create a wiki word for your new page. When you save the page > > you''re editing there will be a link to the not-yet-created page. > > Click on that link and create away! > > -- > > Doug Alcorn - http://lathi.net/RubyOnRailsDeveloper > > doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Ron Jeffries
2005-Sep-15 16:58 UTC
Re: Use the Wiki, that''s what it''s there for (Was: Sending Emails via Cron)
On Thursday, September 15, 2005, at 10:10:58 AM, Matt Pantana wrote:> And I''m not trying to be a jerk either, but if it bothers you to > answer the question...don''t answer it. I''m not trying to dispute that the > value of the info in the Wikis, simply that by apperances, this list is for > exactly the type of question I submitted. If it is not, my apologies, and > maybe it should be articulated what this list *is* for.I''m with you, Matt. It seems easy to someone who can find their way in this stuff ... to find their way. Other people aren''t there yet. The kind of response that I appreciate best includes a short answer, plus a pointer to more info that I "should" have found, without getting pissy about it. Ron Jeffries www.XProgramming.com To be on the wire is life. The rest is waiting. --Karl Wallenda