Ruby on Rails Wednesday, February 24, 2016

Sorry Colin,

Actually I need help about how can I run a background job.
This job needs to listen all events registered in database and send an email when the dates match.

I'm found clockwork gem as an option to do this.
I have to create a worker that runs every minute and verifies if current date/time is the same from the event in the database.
Is it a good alternative ?

Thanks.

On Wednesday, February 24, 2016 at 2:02:24 PM UTC-3, Colin Law wrote:
On 24 February 2016 at 16:38, Gm <javap...@gmail.com> wrote:
> Hi,
>
> I need some help to schedule some tasks.
> I have a database table with a column called: start
>
> I need to send an email and update a column at that start date.
> How can I iterate my database table, verify if today has some tasks to be
> executed and send an email.

You have described a problem with a large number of aspects.  Which
particular bit do you not know how to do?  Running a background job?
Iterating the table? Testing whether you have to do something?
Sending the email? Updating the database? Anything else?

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e75b34b2-eeab-42f7-be7d-68a67776090b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment