Kernel.php 15 KB

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