Forum Moderators: coopster
Cron:
12:30 - send first chunk (script hangs)
12:32 - send next chunk (one more hangs)
sleep:
12:30 - send first chunk (script hangs) - it does nothing more
Example:
Joe needs a widget that might be found in a given state.say FL.
Joe triggers the "search" to locate such a widget.
My script goes through the membership and select all members opt-in and FL
Then the script emails to the selected members.
Which tells us that we have no control on when it will be sent as such cron does not look to be the correct solution to my little problem!
Correct?
if Joe searches now then the email to be sent could be added to a queue and sent when the cron runs next
you don't always want these things firing right away, a queue is often a better way to go as it gives you more control.
as to the hanging
it won't hang if you handle errors properly, well maybe if the mail server goes down but more likely that would cause the mail function to fail and kill the script