onWorkerStart = function () { // Execute the function in the first second of every minute. new Crontab('1 * * * * *', function(){ echo date('Y-m-d H:i:s')."\n"; }); }; Worker::runAll();