CodeIgniter Forums
[solved] Delay in ajax response time - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: [solved] Delay in ajax response time (/thread-69226.html)

Pages: 1 2


RE: Delay in ajax response time - wolfgang1983 - 10-24-2017

(10-23-2017, 04:32 PM)skunkbad Wrote:
(10-22-2017, 11:28 PM)wolfgang1983 Wrote:
(10-22-2017, 11:02 PM)skunkbad Wrote: I use a mail queue for all my websites. It's really an essential thing. As long as you have access to cron:

1) Instead of sending the email, put it in a database table with one field "sent" set to 0;
2) Use cron to check for email that hasn't been sent, send it, then update the "sent" field to 1; (I have cron check for unsent email once per minute)

This type of behavior has a lot of advantages. For one, you can always check if mail is going out. Also, it's really easy to resend email just by marking "sent" as 0 again. There is 0 email sending lag time, because it's being put in a queue.

Not sure how to use cron at all.

Everyone has to learn sometime:
https://www.educba.com/linux-crontab/

All done now. I had to use my website because my localhost xampp not the best for cron using the cpanel on cron job was easier.


RE: Delay in ajax response time - wolfgang1983 - 10-24-2017

Thanks to every for your suggestions. I am using cron now on my main website as my xampp / windows does not let me set cron up well but if I use