index.php 902 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. define('BASE_ROOT_PATH',str_replace('/crontab','',dirname(__FILE__)));
  3. define('BASE_PATH',BASE_ROOT_PATH . '/crontab');
  4. define('BASE_DATA_PATH',BASE_ROOT_PATH . '/data');
  5. define('APP_ID','crontab');
  6. require_once(BASE_PATH . '/config.ini.php');
  7. require_once(BASE_ROOT_PATH . '/extend/queue.php');
  8. require_once(BASE_ROOT_PATH . '/extend/queue.logic.php');
  9. require_once(BASE_ROOT_PATH . '/extend/log.php');
  10. require_once(BASE_ROOT_PATH . '/extend/http.php');
  11. Log::record("Crontab startHandling something....",Log::DEBUG);
  12. class crontab
  13. {
  14. public function onFifteenMinute()
  15. {
  16. $cabinets = $this->getAllCabinet();
  17. foreach ($cabinets as $cabinet) {
  18. }
  19. }
  20. private function getAllCabinet()
  21. {
  22. }
  23. private function getBox($cabinet) {
  24. }
  25. private function reportState()
  26. {
  27. }
  28. }
  29. $worker = new crontab();
  30. $worker->onFifteenMinute();