How can i send my emails and perform some other tasks in batches using php
I run a website and my subscriber base is gradually increasing.
I had to manually batch my subscribers, that is Batch A (1-700), Batch B (701 - 1400) etc. and manually trigger the email sending every hour.
In addition, to sending them emails i want to perform some other tasks along s开发者_StackOverflow社区ide the email.
I believe there should be a way of triggering the message send once from the web interface (that is from my website backend, pls not from the command line), and it batches the emails and processes automatically hourly.
Looking forward to replies on how i can get it done.
Thanks in advance.
If you are unable to schedule cron jobs on your server (as is the case with most cheap hosting solutions), there are some pure php alternatives to run scheduled jobs: phpjobscheduler is one of those alternatives.
In UNIX-like systems, this can be done with cron. In Windows, see the Task Scheduler, schtasks
or at
.
If you don't have access to these tools, you cannot programatically run scripts with a given period (short of having another machine call your scripts via HTTP).
精彩评论