12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- define('BASE_ROOT_PATH',str_replace('/crontab','',dirname(__FILE__)));
- define('BASE_PATH',BASE_ROOT_PATH . '/crontab');
- define('BASE_DATA_PATH',BASE_ROOT_PATH . '/data');
- define('APP_ID','crontab');
- require_once(BASE_PATH . '/config.ini.php');
- require_once(BASE_ROOT_PATH . '/extend/queue.php');
- require_once(BASE_ROOT_PATH . '/extend/queue.logic.php');
- require_once(BASE_ROOT_PATH . '/extend/log.php');
- require_once(BASE_ROOT_PATH . '/extend/http.php');
- Log::record("Crontab startHandling something....",Log::DEBUG);
- class crontab
- {
- public function onFifteenMinute()
- {
- $cabinets = $this->getAllCabinet();
- foreach ($cabinets as $cabinet) {
- }
- }
- private function getAllCabinet()
- {
- }
- private function getBox($cabinet) {
- }
- private function reportState()
- {
- }
- }
- $worker = new crontab();
- $worker->onFifteenMinute();
|