For background run use:
exec("nohup php worker.php >/dev/null 2>/dev/null &");
PHP - Manual: GearmanWorker
2024-11-14
(PECL gearman >= 0.5.0)
$function_name
,$function
,&$context
= ?,$timeout
= ?
For background run use:
exec("nohup php worker.php >/dev/null 2>/dev/null &");