From: Ben Bleything Date: 2010-03-23T11:05:11+09:00 Subject: Re: Help me plan my Ruby app :) On Mon, Mar 22, 2010 at 5:50 PM, Alex Baranosky wrote: > So I am interested in writing a program to read a file I write, with > different reminder info in it, and then have it send emails to my > account with the proper message on the proper days as reminders for me. Neat! > At first thought it seems I would like this software to run all the > time, so a web app would make most sense. Does it? I don't think so. > Then I thought I could probably get away with having it run in the > background, and  have it start running on startup.  The webapp version, > seems like the better approach, though I'd like to avoid paying much of > anything for the hosting.  My bandwidth usage would be TINY, so perhaps > something that charges by the bandwidth would be best option for this? > (Heroku??) Sure, a webapp is running all the time, but unless there's a request coming in, it's not doing anything. That means that you'd need to automate something to hit the app every so often to get it to do whatever it is you want to do. > An ideas on what would be some good ideas for a little app like this? > Ruby-world specific libraries, or Rails libraries etc...  Maybe Rails > isn't even the right approach, considering how simple the webapp is; > it's really just a extremely simple service; its just a glorified spam > bot ;) (for myself) Skip the webapp idea altogether. What you want is a script that can parse a file and for each entry in the file say "do I need to email about this?" and then either do so or move on to the next. Then, set it up to run under cron however often you like, and you're set. You'll likely want to leave behind an artifact of the last run time, so you'll know when the last run was and therefore be able to figure out if any events fired in the meantime. You might be interested in chronic for date parsing: http://github.com/mojombo/chronic Ben