Background tasks in PHP without the client, an alternative to cron?

The bottom line is this - there is some system (php application), when it reaches a certain state it executes some task in PHP.

Example: there is a list of orders. - If there are undelivered orders that have left at least 30 minutes before estimated delivery time, it is necessary to send a notification to the courier that he might be late.

The simplest solution is to add a cron job once a minute to run a script that will check the condition and doing the job. Is there alternative in modern php?
Looked in the direction of the queues and servers of the task, gearman, rabbitmq, but there uscas to understand how little the other is a client that directly sends a task to the queue, and in my customer's case, there is simply the state of the system, which triggered task.
Another option - a php daemon, which in a loop to test a condition and put to sleep the script for a minute. But we need to think about memory leaks, restart the daemon, etc.

Really in the end, banal cron here the best solution?
July 2nd 19 at 18:10
3 answers
July 2nd 19 at 18:12
Daemons in php are and will be, Google:
https://daemon.io/
profyclub.ru/docs/274
Try it, read reviews etc. the Problem with demons is that they need more-no, and the monitoring system runs a daemon or not (the server was rebooted, was virginal all the memory, just hovering, etc.) and all sorts of system startup in case of maintenance work in DC.

The decision on cron usually easier and more reliable, but only in one case: there is a guarantee that when the script is run for the crown, the previous script has already finished its work, otherwise the server crash it's just a matter of time or circumstances.
the demons easily run under supervisor, which is installed and Konfiguracja for 15 minutes, though. in the arms of Google - albertha.Medhur commented on July 2nd 19 at 18:15
: Of course, but sometimes work with developers, system administrators are not in the tooth foot, or have to do a project and leave, and who then them to the new server supervisor is to put? Or not a root. Still that would be correct and work seamlessly with the demons need to possess some skills in system administration... - Abdullah commented on July 2nd 19 at 18:18
if they were oaks, then why do you have to fence the stuff? - albertha.Medhur commented on July 2nd 19 at 18:21
July 2nd 19 at 18:14
What's wrong with the crowns? The perfect solution is not trivial. Why reinvent the wheel?
July 2nd 19 at 18:16

Find more questions by tags DemonsCronPHP