crontab.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. //定时任务,在java定时访问调用
  3. header("Content-Type:text/html; charset=utf-8");
  4. define("FANWE_REQUIRE",true);
  5. require './system/mapi_init.php';
  6. fanwe_require(APP_ROOT_PATH.'mapi/lib/core/common.php');
  7. //直播消息推送
  8. fanwe_require(APP_ROOT_PATH.'mapi/lib/core/push.php');
  9. fanwe_require(APP_ROOT_PATH.'mapi/lib/redis/BaseRedisService.php');
  10. //fanwe_require(APP_ROOT_PATH.'mapi/lib/redis/VideoViewerRedisService.php');
  11. $ret_array = array();
  12. $ret_array2 = crontab_do_end_video();
  13. $ret_array3 = crontab_do_end_video_2();
  14. array_push($ret_array,$ret_array2,$ret_array3);
  15. //$obj = new VideoViewerRedisService();
  16. //$obj->crontab_robot();
  17. //添加机器人
  18. crontab_robot();
  19. //每隔N秒,将在线直播redis计算的数据同步到mysql中
  20. //推送消息
  21. push_notice(0,0,array(0,1));
  22. //将发送礼物记录移到mysql数据库中 ,修改将礼物发送记录直接写入mysql,关闭redis同步 @by slf
  23. //sync_video_prop_to_mysql(-1);
  24. //回播定时推送观众列表
  25. crontab_viewer(0);
  26. echo json_encode($ret_array);
  27. ?>