$ws_worker->onWorkerStart = function($ws_worker)
{
$time_interval = 5;
$timer_id = Timer::add($time_interval,
function() use ($ws_worker)
{
foreach($ws_worker->connections as $connection) {
$connection->send('text');
}
}
);
};