The question leads to:
Put a \Workerman\Lib\Timer in start_gateway.php and execute it every two seconds. Each execution first records a piece of text to text file.
There is no problem when running as php start.php start, but when running as php start.php start -d, it seems that the timer is not running.
start_gateway.php code is as follows
Business logic must be run in the onXXX callback (emphasized in the manual). In other words, the timer cannot run before
Worker::runAll(); is executed.
The above is the detailed content of The timer in workerman does not take effect. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

WebStorm Mac version
Useful JavaScript development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool
