PHP code example of jet-snowman / yii2-daemon
1. Go to this page and download the library: Download jet-snowman/yii2-daemon library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jet-snowman / yii2-daemon example snippets
protected function getDaemonsList() {
return [
['daemon' => 'metric/metric-license-daemon', 'enabled' => TRUE, 'debug' => TRUE, 'kill' => TRUE, 'maxTime' => 60, 'count' => 2],
['daemon' => 'metric/metric-facility-daemon', 'enabled' => TRUE, 'debug' => TRUE, 'kill' => TRUE, 'maxTime' => 60, 'count' => 3],
['daemon' => 'metric/metric-wordpress-daemon', 'enabled' => TRUE, 'debug' => TRUE, 'kill' => TRUE, 'maxTime' => 60, 'count' => 2],
['daemon' => 'metric/metric-delivery-daemon', 'enabled' => TRUE, 'debug' => TRUE, 'kill' => TRUE, 'maxTime' => 60, 'count' => 1],
['daemon' => 'greenbits/greenbits-product-daemon', 'enabled' => TRUE, 'debug' => TRUE, 'kill' => TRUE, 'maxTime' => 60, 'count' => 1],
];
}
#!/usr/bin/env php
define('DAEMON_NAME', 'Metric Delivery Daemon');
define('DAEMON_BIN_NAME', 'metric/metric-delivery-daemon');
define('DAEMON_PID_NAME', 'metric-metric-delivery-daemon');