# Sending emails on user specific scheduled times

**URL:** <https://www.ruby-forum.com/t/sending-emails-on-user-specific-scheduled-times/163445>\
**Category:** Rails\
**Created:** [March 20, 2009, 1:37pm UTC](https://www.ruby-forum.com/t/sending-emails-on-user-specific-scheduled-times/163445 "2009-03-20T13:37:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![intern\_ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/dc4da7/32.png) [@intern\_ruby](https://www.ruby-forum.com/u/intern_ruby)\
**Post date:** [March 20, 2009, 1:37pm UTC](https://www.ruby-forum.com/t/sending-emails-on-user-specific-scheduled-times/163445/1 "2009-03-20T13:37:26Z")

</div>

Hello,

I am building an application in which I have to send recurring emails  
and I am using actionmailer to send one time emails and it is working  
fine. Now, I need to set up user specific dates/time and mails should be  
send at those times. Does any body have any idea of how should I do it ?  
I am not able to understand how to setup cron jobs from ruby  
application. Any help would be appreciated.

Thanks.

---

<div class="post-metadata">

**Author:** ![intern\_ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/dc4da7/32.png) [@intern\_ruby](https://www.ruby-forum.com/u/intern_ruby)\
**Post date:** [March 20, 2009, 2:48pm UTC](https://www.ruby-forum.com/t/sending-emails-on-user-specific-scheduled-times/163445/2 "2009-03-20T14:48:48Z")

</div>

What about Rufus Scheduler?

[http://www.railsinside.com/misc/234-scheduler-simple-task-scheduling-from-rails-apps.html](http://www.railsinside.com/misc/234-scheduler-simple-task-scheduling-from-rails-apps.html)

---

<div class="post-metadata">

**Author:** ![intern\_ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/dc4da7/32.png) [@intern\_ruby](https://www.ruby-forum.com/u/intern_ruby)\
**Post date:** [March 20, 2009, 2:41pm UTC](https://www.ruby-forum.com/t/sending-emails-on-user-specific-scheduled-times/163445/3 "2009-03-20T14:41:03Z")

</div>

You could use a cron job that runs a rake task every hour, or you  
could use the Starling/Workling configuration to poll for emails that  
are scheduled to be sent out. You should watch the Railscasts below:

> **[\#127 Rake in Background - RailsCasts](http://railscasts.com/episodes/127-rake-in-background)**
>
> Short Ruby on Rails screencasts containing tips, tricks and tutorials. Great for both novice and experienced web developers.

> **[\#128 Starling and Workling - RailsCasts](http://railscasts.com/episodes/128-starling-and-workling)**
>
> Short Ruby on Rails screencasts containing tips, tricks and tutorials. Great for both novice and experienced web developers.

Give it a shot!

Thanks,  
Tom

On Mar 20, 8:37 am, Intern ruby [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
