Send mail after x hours

120 views
Skip to first unread message

Kishan Mehta

unread,
Aug 17, 2016, 7:05:30 AM8/17/16
to django...@googlegroups.com
Hi guys,

I am using django 1.9. I am working on requirement where we need to send users reminder to activate their account by email after x hours h/she has signed on our platform.

I have send_mail task and I have configured https://github.com/ui/django-rq to send mails. 

One way I can think of is to set up a cron job using https://github.com/ui/rq-scheduler which runs every 5 mins to check for users who signed up 6 hours before. 

Is there any better way to do this ?

Thanks,
Kishan

Dheerendra Rathor

unread,
Aug 17, 2016, 7:09:58 AM8/17/16
to Kishan Mehta, django...@googlegroups.com

I’ll suggest you to use some background task runner. Celery will work great for you as it is developed for Python and work on multiple platform with multiple types of message queues.

 

Sent from Mail for Windows 10

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAC5ThKGOFyWObnZTV8VpT57eyWqEq5%2B-OaMj7L%3Dr%3Dh41bJVWXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

 

Kishan Mehta

unread,
Aug 17, 2016, 7:10:27 AM8/17/16
to Dheerendra Rathor, django...@googlegroups.com
Thanks but I already have django rq adn rq-scheduler configured and running so I was thinking to use it and avoid celery.


On Wed, Aug 17, 2016 at 4:37 PM, Dheerendra Rathor <dheeru....@gmail.com> wrote:

I’ll suggest you to use some background task runner. Celery will work great for you as it is developed for Python and work on multiple platform with multiple types of message queues.

 

Sent from Mail for Windows 10

 

From: Kishan Mehta
Sent: Wednesday, August 17, 2016 4:35 PM
To: django...@googlegroups.com
Subject: Send mail after x hours

 

Hi guys,

 

I am using django 1.9. I am working on requirement where we need to send users reminder to activate their account by email after x hours h/she has signed on our platform.

 

I have send_mail task and I have configured https://github.com/ui/django-rq to send mails. 

 

One way I can think of is to set up a cron job using https://github.com/ui/rq-scheduler which runs every 5 mins to check for users who signed up 6 hours before. 

 

Is there any better way to do this ?

 

Thanks,

Kishan

--
You received this message because you are subscribed to the Google Groups "Django users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

Asad Jibran Ahmed

unread,
Aug 17, 2016, 9:23:32 AM8/17/16
to Django users
Personally, I'd setup a simple cronjob on my machine that runs a Django management command. The command would get a list of users who are eligible to receive emails and send it to them.

I would have just used the send_mail directly from my management command, but if you already have a RQ setup for that, just go ahead and use the same.

This approach is simple and doesn't require using the rq-scheduler. But if you really want, using rq-scheduler is basically the same and the end result is similar.


On Wednesday, August 17, 2016 at 3:10:27 PM UTC+4, Kishan Mehta wrote:
Thanks but I already have django rq adn rq-scheduler configured and running so I was thinking to use it and avoid celery.

On Wed, Aug 17, 2016 at 4:37 PM, Dheerendra Rathor <dheeru....@gmail.com> wrote:

I’ll suggest you to use some background task runner. Celery will work great for you as it is developed for Python and work on multiple platform with multiple types of message queues.

 

Sent from Mail for Windows 10

 

From: Kishan Mehta
Sent: Wednesday, August 17, 2016 4:35 PM
To: django...@googlegroups.com
Subject: Send mail after x hours

 

Hi guys,

 

I am using django 1.9. I am working on requirement where we need to send users reminder to activate their account by email after x hours h/she has signed on our platform.

 

I have send_mail task and I have configured https://github.com/ui/django-rq to send mails. 

 

One way I can think of is to set up a cron job using https://github.com/ui/rq-scheduler which runs every 5 mins to check for users who signed up 6 hours before. 

 

Is there any better way to do this ?

 

Thanks,

Kishan

--
You received this message because you are subscribed to the Google Groups "Django users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages