Kernel.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. <?php
  2. namespace App\Console;
  3. use Illuminate\Console\Command;
  4. use Illuminate\Console\Scheduling\Schedule;
  5. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  6. class Kernel extends ConsoleKernel
  7. {
  8. /**
  9. * The Artisan commands provided by your application.
  10. *
  11. * @var array
  12. */
  13. protected $commands = [
  14. Commands\ChapterImageTask::class,
  15. Commands\BillTask::class,
  16. Commands\PaymentQueryTask::class,
  17. Commands\PaymentStatisticTask::class,
  18. Commands\BusinessChannelStatTask::class,
  19. Commands\BookAdjust::class,
  20. Commands\BookAdjustOne::class,
  21. Commands\UpdateBookClickCount::class,
  22. Commands\SignReward::class,
  23. Commands\NoPayRemind::class,
  24. Commands\Trade\GenerateOrderDayStat::class,
  25. Commands\Trade\GenerateOrderStat::class,
  26. Commands\SendServiceMsg::class,
  27. Commands\FailOrderAlertV2::class,
  28. Commands\BookAfterSpider::class,
  29. Commands\ChangePay::class,
  30. Commands\WechatCustumerPushStatistical::class,
  31. Commands\Channel\CheckStatus::class,
  32. Commands\ChapterOrderTotal::class,
  33. Commands\SendOrder\GenerateForceDayStat::class,
  34. Commands\SendOrder\GenerateStat::class,
  35. Commands\SendOrder\SetExtraStats::class,
  36. Commands\SendOrder\GenerateBookUvRegisterStat::class,
  37. Commands\SendOrder\UserActivityStats::class,
  38. Commands\CheckAndSend::class,
  39. Commands\RecoverPush::class,
  40. Commands\ForceUserActive::class,
  41. Commands\ForceUserActiveDetail::class,
  42. Commands\PaidUserRemind::class,
  43. Commands\SendOrderBreakevenForceUser::class,
  44. Commands\UnPaidUserActivity::class,
  45. Commands\CustomSubscribePush::class,
  46. Commands\CustomSignPush::class,
  47. Commands\AsyncUserSign::class,
  48. Commands\SmartPush\AllPushHotBook::class,
  49. Commands\SmartPush\PaidPushPointBook::class,
  50. Commands\SmartPush\UnPaidPushHotBook::class,
  51. Commands\SmartPush\UnPaidPushPointBook::class,
  52. Commands\SmartPush\UnPaidUserBigActivity::class,
  53. Commands\SmartPush\UnPaidUserSmallActivity::class,
  54. Commands\SmartPush\LongChapterTemplate::class,
  55. Commands\SmartPush\LongChapterCustom::class,
  56. Commands\SmartPush\PaidUserCustom::class,
  57. Commands\Tool\OfficialAccountUserTranser::class,
  58. Commands\Tool\MaintainTempForceSubscribeUser::class,
  59. Commands\Tool\MaintainUserSign::class,
  60. Commands\Tool\TitleImageStatistics::class,
  61. Commands\Tool\ThirdPlatomUserTranser::class,
  62. Commands\Tool\MaintainMenus::class,
  63. Commands\Tool\TestSmartPush::class,
  64. Commands\Tool\createTable::class,
  65. Commands\DistributionStats\WeeklyDailyStats::class,
  66. Commands\SubscribeDataStats::class,
  67. Commands\ForBiddenOfficialAccountRemind::class,
  68. Commands\RepeatBookOrderRecover::class,
  69. Commands\SubscribeAlert::class,
  70. Commands\CheckOfficialAccountTemplate::class,
  71. Commands\OfficialAccountStat\SubUserRecharge::class,
  72. Commands\WapVisitStat::class,
  73. Commands\AutoSendTrusteeShipCustomerMsg::class,
  74. Commands\CustomMsg\CustomMsgStrategyAutoSend::class,
  75. Commands\BookAttr::class,
  76. Commands\OfficialAccountBillsTask::class,
  77. Commands\SendOrder\SendStatsEmail::class,
  78. Commands\ProductStats\SendMonthStatsEmail::class,
  79. Commands\ProductStats\DailyProductionStats::class,
  80. Commands\ProductStats\DailyProductionStats::class,
  81. Commands\ProductStats\SendDailyNewProductionStats::class,
  82. Commands\ProductStats\MonthlyProductionStats::class,
  83. Commands\ProductStats\SendDailyProductionStats::class,
  84. Commands\ProductStats\SendMonthlyProductStats::class,
  85. Commands\SuperiorBooks\DailyScanForSupriorNewBook::class,
  86. Commands\SuperiorBooks\HistorySupriorBook::class,
  87. Commands\UserSubscribleStatistic::class,
  88. Commands\fansMaximumNotice::class,
  89. Commands\BookGiftStats\BookGiftStatsByBook::class,
  90. Commands\BookGiftStats\BookGiftStatsByGift::class,
  91. Commands\WholeBookOrderData::class,
  92. Commands\AutoWithdrawCash::class,
  93. Commands\ChannelReaderVisitStats::class,
  94. Commands\ChannelReaderVisitStats::class,
  95. Commands\UserPayUpdateTask::class,
  96. Commands\CheckZsySiteStatus::class,
  97. Commands\UpdateUserActualSubscribeNum::class,
  98. Commands\ReadRecordPersistence::class,
  99. Commands\SmartPush\UpdateMediaPushRechargeInfo::class,
  100. Commands\SmartPush\UpdateRecommandBooks::class,
  101. Commands\ZsyAlert::class,
  102. Commands\ActiveUser::class,
  103. Commands\UserRegisterDayStat::class,
  104. Commands\SendOrder\GenerateDayByBooksStat::class,
  105. Commands\OfficialAccountStat\OfficialAccountForbiddenStatus::class,
  106. Commands\LatestCustomerMsg::class,
  107. Commands\BookSearchInfoStat::class,
  108. Commands\ActivitiesStats::class,
  109. Commands\SuperiorBooks\UpdateHighQualityBooks::class,
  110. Commands\userProperty::class,
  111. Commands\Channel\SiteTitle::class,
  112. Commands\SendOrder\UpdateSendOrderPreSendDate::class, //派单预计发送时间
  113. Commands\Book\BookRechargePredict::class, //书籍充值位置预测
  114. Commands\Book\NewBookTestData::class, //新书测试数据填充
  115. Commands\Book\NewBookTestUserDetail::class, //新书测试用户数据记录
  116. //派单pvuv
  117. Commands\SendOrder\SendOrderSendOrderPvUv::class,
  118. Commands\Trade\RecalcOrderStatistic::class,
  119. Commands\User\SetUserNovelPorperty::class,
  120. Commands\User\CreateDropTable::class,
  121. Commands\SendOrder\StatSendOrderByDate::class,
  122. Commands\Trade\GenNewUserChargeDayStatistic::class,
  123. Commands\Trade\NewUserStatistic::class,
  124. Commands\Book\ChapterRetentionRate::class,
  125. //每日生成派单按用户注册统计
  126. Commands\SendOrder\GenerateUserRegistStat::class,
  127. //限免统计
  128. Commands\Book\FreeBookStats::class,
  129. //用户最近订阅的书
  130. Commands\User\UserLastChapterOrder::class,
  131. //bookChargeStats 图书充值统计
  132. Commands\Book\bookChargeStats::class,
  133. // temp
  134. Commands\Temp\NewBookTestType::class,
  135. Commands\Temp\CheckCidError::class,
  136. Commands\Temp\GenAMSXmlFile::class,
  137. ];
  138. /**
  139. * Define the application's command schedule.
  140. *
  141. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  142. * @return void
  143. */
  144. protected function schedule(Schedule $schedule)
  145. {
  146. //每日派单数据生成
  147. $schedule->command('send_order:generate_force_day_stat')->dailyAt("04:30");
  148. //派单按用户注册统计
  149. $schedule->command('GenerateUserRegistStat')->dailyAt('04:20');
  150. $schedule->command('bill_task')->dailyAt("00:30");
  151. //每日打款报表
  152. $schedule->command('payment_statistic_task')->dailyAt("00:30");
  153. //打款状态查询 10分钟执行一次
  154. $schedule->command('payment_query_task')->everyTenMinutes();
  155. //每日商务渠道数据报表
  156. $schedule->command('BusinessChannelStat_task')->dailyAt("02:30");
  157. //腾讯商品库
  158. $schedule->command('gen_ams_xml_file')->hourly()->between('6:00', '21:00');
  159. //点击率
  160. $schedule->command('book:clicknumupdate')->dailyAt('01:00');
  161. //图书预充位置计算
  162. $schedule->command('book_recharge_predict')->dailyAt('03:01');
  163. //未支付提醒
  164. $schedule->command('Pay:remind')->hourly();
  165. //检查公众号模板
  166. $schedule->command('CheckOfficialAccountTemplate')->dailyAt("04:25");
  167. //订单相关
  168. //生成渠道日统计
  169. $schedule->command('generate_order_day_stat')->dailyAt("00:05");
  170. //生成渠道汇总统计
  171. $schedule->command('generate_order_stat')->dailyAt("00:25");
  172. //订单预警
  173. $schedule->command('foav2')->everyMinute();
  174. //异步签到插入
  175. $schedule->command('AsyncUserSign')->everyMinute();
  176. //推送统计
  177. $schedule->command('pay:wcps')->dailyAt('02:30');
  178. //托管推送
  179. $schedule->command('pay:wcps --auto')->dailyAt('05:20');
  180. //更新章节订购统计
  181. $schedule->command('book:cot')->dailyAt('01:15');
  182. $schedule->command('CheckAndSend')->everyMinute();
  183. // 检查公众号被封
  184. // $schedule->command('ForBiddenOfficialAccountRemind')->hourly();
  185. //更新粉丝数
  186. $schedule->command('sendorderbreadforceuser')->dailyAt('02:50');
  187. //签到统计
  188. $schedule->command('sign:reward --record')->dailyAt('02:00');
  189. //cp订阅书币和充值币和赠送币
  190. $schedule->command('book:cot --type=cp')->dailyAt('02:20');
  191. //order_day_stats 阅书币和充值币和赠送币
  192. $schedule->command('book:cot --type=order')->dailyAt('02:40');
  193. //send_orders_stats 阅书币和充值币和赠送币
  194. $schedule->command('book:subds')->dailyAt('03:10');
  195. //粉丝预警
  196. // $schedule->command('subscribealert --type=getTopAlert')->hourly();
  197. //强关预警
  198. // $schedule->command('subscribealert --type=subscribeRateAlert')->hourly();
  199. //uv pv redis持久
  200. $schedule->command('wvs 9')->dailyAt('04:00');
  201. //客服消息策略发送客服消息
  202. $schedule->command('auth_send_custom_msg_by_strategy')->hourlyAt(4);
  203. //跑派单ID的24小时的uv、pv
  204. $schedule->command('send_order:set_extra_stats')->everyMinute();
  205. //服务号每日充值统计
  206. $schedule->command('official_account_bills_task')->dailyAt('05:00');
  207. //每日派单数量统计
  208. $schedule->command('book:attr')->dailyAt('04:40');
  209. //统计每周派单发送邮件
  210. $schedule->command('sendOrderEmail')->dailyAt('08:00');
  211. $schedule->command('sendMonthOrderEmail')->monthlyOn(3, '08:00');
  212. //每日作品统计
  213. $schedule->command('saveDailyProductsStats')->dailyAt('00:10');
  214. //$schedule->command('saveMonthlyProductsStats')->monthlyOn(1, '00:20');
  215. $schedule->command('SendDailyProductsStats')->dailyAt('08:05');
  216. $schedule->command('SendDailyNewProductsStats')->dailyAt('08:00');
  217. $schedule->command('SendMonthlyProductsStats')->monthlyOn(1, '08:20');
  218. //优质书库
  219. $schedule->command('addSuperiorBook')->dailyAt('00:50');
  220. $schedule->command('addHistorySuperiorBook')->dailyAt('01:20');
  221. /********** 智能推送统一这里管理 ***********/
  222. //全量推送热门书籍
  223. $schedule->command('SmartPush:AllPushHotBook')->hourly()->between('6:00', '24:00');
  224. //已付费推送定制书籍
  225. $schedule->command('SmartPush:PaidPushPointBook')->hourly()->between('6:00', '24:00');
  226. //未付费推送热门书籍
  227. $schedule->command('SmartPush:UnpaidPushHotBook')->hourly()->between('6:00', '24:00');
  228. //未付费推送定制书籍
  229. $schedule->command('SmartPush:UnpaidPushPointBook')->hourly()->between('6:00', '24:00');
  230. //未支付新用户优惠充值活动(更多充值选项)
  231. $schedule->command('SmartPush:UnPaidUserBigActivity')->hourly()->between('6:00', '24:00');
  232. //未支付新用户9.9充值活动
  233. $schedule->command('SmartPush:UnPaidUserSmallActivity')->hourly()->between('6:00', '24:00');
  234. //支付用户6小时后推送客服消息
  235. $schedule->command('SmartPush:PaidUserCustom')->hourly()->between('6:00', '24:00');
  236. //测试用户推送长篇客服
  237. $schedule->command('SmartPush:LongChapterCustom')->hourly()->between('6:00', '24:00');
  238. //测试用户推送长篇模板
  239. $schedule->command('SmartPush:LongChapterTemplate')->hourly()->between('6:00', '24:00');
  240. //关注智能推送
  241. $schedule->command('CustomSubscribePush')->everyFiveMinutes();
  242. //签到智能推送
  243. $schedule->command('CustomSignPush')->everyFiveMinutes();
  244. /********** 智能推送 end ***********/
  245. //粉丝统计:用户强关行为统计
  246. $schedule->command('user_subscribe_statistic')->dailyAt('01:10');
  247. //强关中间表每日维护
  248. $schedule->command('MaintainTempForceSubscribeUser')->dailyAt('03:02');
  249. //签到中间表每日维护
  250. $schedule->command('MaintainUserSign')->dailyAt('03:04');
  251. //阈值提醒
  252. $schedule->command('addFansMaximumNotice')->hourly();
  253. //用户打赏统计
  254. $schedule->command('BookGiftDailyStatsByBook')->dailyAt('01:05');
  255. $schedule->command('BookGiftDailyStatsByGift')->dailyAt('01:10');
  256. //内外部派单按数据统计数据
  257. $schedule->command('sendOrder_book_uv_register_stat')->dailyAt('9:11');
  258. //封号
  259. // $schedule->command('check_official_account_forbidden_status')->dailyAt('7:03');
  260. //阅读页面PV 和 UV 的记录
  261. $schedule->command('channel_reader_visit_stats')->dailyAt('8:00');
  262. //更新服务号实际新增用户数
  263. $schedule->command('updateUserSubNum')->dailyAt('8:10');
  264. //完整 阅读记录
  265. $schedule->command('ReadRecordPersistence')->everyFiveMinutes();
  266. //注册用户地区信息统计
  267. $schedule->command('user_register_day_stat')->dailyAt('05:04');
  268. //最近3天的客服消息
  269. $schedule->command('LatestCustomerMsg')->everyTenMinutes();
  270. //搜素关键字统计
  271. $schedule->command('book_search_stat')->weekly()->fridays()->at('05:02');
  272. // 创建表
  273. $schedule->command('createtable')->monthlyOn(15);
  274. //更新优质书库
  275. $schedule->command('update_high_quality_books')->everyTenMinutes();
  276. //用户精致
  277. $schedule->command('userProperty')->dailyAt("01:18");
  278. //设置站点名称
  279. $schedule->command('SetSiteTitle')->everyFifteenMinutes();
  280. $schedule->command('new_book_test_data')->everyMinute(); //更新新书测试数据
  281. $schedule->command('new_book_test_user_detail')->everyFifteenMinutes(); //更新新书测试用户数据
  282. //派单pvuv
  283. $schedule->command('SendOrder:SendOrderSendOrderPvUv')->everyFiveMinutes();
  284. $schedule->command('SendOrder:SendOrderSendOrderPvUv --type=history')->dailyAt('00:09');
  285. $schedule->command('create_drop_table')->dailyAt('00:01');
  286. // $schedule->command('set_user_novel_property', ['--is_init' => 0])->hourlyAt(13);
  287. //腾讯商品库
  288. // $schedule->command('gen_ams_xml_file')->hourly()->between('6:00', '21:00');
  289. $schedule->command('temp:cal_send_order_time')->monthlyOn(3, '08:00');
  290. $schedule->command('new_user_charge_statistic', ['--begin_date' => '', '--end_date' => '', '--date' => ''])->dailyAt('03:10');
  291. /**
  292. * 书籍留存率
  293. */
  294. $schedule->command('calc_chapter_retention_rate', ['--is_all' => 1])->dailyAt('00:07');
  295. /**
  296. * 派单充值数据统计
  297. */
  298. $schedule->command('send_order_recharge_stat')->dailyAt('01:00');
  299. $schedule->command('book:FreeBookStats')->dailyAt('02:13');
  300. $schedule->command('get_new_book_test_type')->hourlyAt(43);
  301. //用户最近订阅
  302. $schedule->command('User:UserLastChapterOrder')->cron('*/6 * * * * ');
  303. //检查切张错误
  304. // $schedule->command('check_cid_error')->dailyAt('04:00');
  305. //图书充值统计
  306. $schedule->command('bookChargeStats')->dailyAt('01:33');
  307. //站点配置
  308. $schedule->command('Tool:ConfigSetting')->dailyAt('11:33');
  309. // $schedule->command('cp_agent_book_day_stat')->dailyAt('01:27');
  310. // $schedule->command('cp_agent_day_stat')->dailyAt('01:44');
  311. $schedule->command('new_user_charge_day_statistic')->dailyAt('05:44');
  312. }
  313. }