资 源 简 介
Important
There is also GIT hosted version of this library, see ScriptAlone on GitHub.
Example task
You have a live queue of emails(for example in DB) that must be sent as soon as possible.
You need to have some PHP-script that will check if there are any emails in queue, and if yes so send them.
This PHP-script must be runned all time, and check queue every second.
Only one instance of this PHP-script can be runned, to be sure that one email was not sent twice.
PHP-script can be interrupted in any moment by some error, so in this case it must be restarted as soon as possible.
PHP-script can have a bug on some iteration, mean: it will be lunched but not sending emails, so in this case it must be restarted as soon as possible.
PHP-script should be restarted every 5-10 hours to prevent memory leaks and do it in safe way (when all current tas