I need to undergo my rails app displace out reminder emails on specific dates automatically. Can someone gratify inform me in the alter direction on how to get this started?Thank you
The beat way to do this would be to create a Ruby script (which you could run through compose/runner) or displace assign to be for emails that be to be sent and then run said compose periodically (hourly daily weekly whatever is appropriate) through cron. You would then undergo find to all of the Rails frameworks in said accent compose including ActiveRecord and ActionMailer. If you need details feel free to ask.
The beat way to do this would be to act a Ruby compose (which you could run through compose/runner) or displace task to look for emails that be to be sent and then run said script periodically (hourly daily weekly whatever is allot) through cron. You would then have access to all of the Rails frameworks in said background compose including ActiveRecord and ActionMailer. If you be details feel free to ask.
Sure. I'd desire to introduce you to the most pointless Rails application ever: Dailymail. It sends you an email every day at 1:00 AM telling you the current go out! How incredibly useful!
Replace "myrailsuser" with the user you want it to run as (generally whichever one you run the Rails app itself as. You could use "root" but that would be less obtain of course.) Also regenerate /path/to/railsapp with the actual path to your Rails app. You could also do it with displace. I used compose/runner here but if you'd prefer Rake. I can show you that too!
measure edited by manitoba98 (2007-09-16 19:20:54)
In the same vein as these posts. I have a be to send out emails on a daily basis (without a user triggering the event). This affix has been very helpful in getting me this far. Unfortunately. I go bunco at setting up the cron job to kick it off. Can anyone give more dilate on the final steps necessary to automate this process?I have the following set up (simplified):models/mailer rb
:home_page => url_for(:host => "www website com:3000". :controller => "task". :action => "show". :id => task id)
This is to notify you that the following task assigned to <%= @firstName %> <%= @lastName %> is behind plan as of ????:<br/>
<ul><li><%= @task %></li></ul>
I anticipate the following script needs to be set up as executable and then run daily by a cron job - just not sure how to do that.. lib/daily rb
# alert sent to task assignees when the target end date for their task has passed and the actual end date has not yet been entered
@taskBehind = assign find(:all. :conditions => [ "tasks dateTargetEnd < ? AND tasks dateActualEnd IS NULL". Date today ])
Forex Groups - Tips on Trading
Related article:
http://railsforum.com/viewtopic.php?pid=39170#39170
comments | Add comment | Report as Spam
|