Kernel.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <?php
  2. namespace App\Console;
  3. use Illuminate\Console\Scheduling\Schedule;
  4. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  5. class Kernel extends ConsoleKernel
  6. {
  7. /**
  8. * The Artisan commands provided by your application.
  9. *
  10. * @var array
  11. */
  12. protected $commands = [
  13. Commands\ChapterImageTask::class,
  14. Commands\BillTask::class,
  15. Commands\PaymentQueryTask::class,
  16. Commands\PaymentStatisticTask::class,
  17. Commands\BusinessChannelStatTask::class,
  18. Commands\BookAdjust::class,
  19. Commands\BookAdjustOne::class,
  20. Commands\BookSpider::class,
  21. Commands\BookUpdate::class,
  22. Commands\BookUpdateOne::class,
  23. Commands\UpdateBookClickCount::class,
  24. Commands\BookTest::class,
  25. Commands\SignReward::class,
  26. Commands\NoPayRemind::class,
  27. Commands\Trade\GenerateOrderDayStat::class,
  28. Commands\Trade\GenerateOrderStat::class,
  29. Commands\SendServiceMsg::class,
  30. Commands\FailOrderAlert::class,
  31. Commands\BookAfterSpider::class,
  32. Commands\PayChannelCheck::class,
  33. Commands\ChangePay::class,
  34. Commands\WechatCustumerPushStatistical::class,
  35. Commands\Sub\GenerateCpSubDayStat::class,
  36. Commands\Channel\CheckStatus::class,
  37. Commands\ChapterOrderTotal::class,
  38. Commands\SendOrder\GenerateForceDayStat::class,
  39. Commands\SendOrder\GenerateStat::class,
  40. Commands\SendOrder\SetExtraStats::class,
  41. Commands\SendOrder\GenerateBookUvRegisterStat::class,
  42. Commands\SendOrder\UserActivityStats::class,
  43. Commands\CheckAndSend::class,
  44. Commands\RecoverPush::class,
  45. Commands\ForceUserActive::class,
  46. Commands\ForceUserActiveDetail::class,
  47. Commands\PaidUserRemind::class,
  48. Commands\SendOrderBreakevenForceUser::class,
  49. Commands\UnPaidUserActivity::class,
  50. Commands\CustomSubscribePush::class,
  51. Commands\CustomSignPush::class,
  52. Commands\SmartPush\AllPushHotBook::class,
  53. Commands\SmartPush\PaidPushPointBook::class,
  54. Commands\SmartPush\UnPaidPushHotBook::class,
  55. Commands\SmartPush\UnPaidPushPointBook::class,
  56. Commands\SmartPush\UnPaidUserBigActivity::class,
  57. Commands\SmartPush\UnPaidUserSmallActivity::class,
  58. Commands\SmartPush\LongChapterTemplate::class,
  59. Commands\SmartPush\LongChapterCustom::class,
  60. Commands\SmartPush\PaidUserCustom::class,
  61. Commands\Tool\OfficialAccountUserTranser::class,
  62. Commands\Tool\TestSmartPush::class,
  63. Commands\Tool\MaintainTempForceSubscribeUser::class,
  64. Commands\Tool\MaintainSubscribeReplyRedisData::class,
  65. Commands\Tool\TitleImageStatistics::class,
  66. Commands\Tool\ThirdPlatomUserTranser::class,
  67. Commands\DistributionStats\WeeklyDailyStats::class,
  68. Commands\SubscribeDataStats::class,
  69. Commands\ForBiddenOfficialAccountRemind::class,
  70. Commands\RepeatBookOrderRecover::class,
  71. Commands\SubscribeAlert::class,
  72. Commands\CheckOfficialAccountTemplate::class,
  73. Commands\OfficialAccountStat\SubUserRecharge::class,
  74. Commands\Temp\UserSign::class,
  75. Commands\Temp\FansArpu::class,
  76. Commands\Temp\Siorder::class,
  77. Commands\Temp\FixRealReg::class,
  78. Commands\Temp\OfficialAccountSubStat::class,
  79. Commands\WapVisitStat::class,
  80. Commands\CP\GenerateCpBookStat::class,
  81. Commands\CP\GenerateCpBookBetweenStat::class,
  82. Commands\AutoSendTrusteeShipCustomerMsg::class,
  83. Commands\WelfareNextDay::class,
  84. Commands\WelfarePrize::class,
  85. Commands\BookAttr::class,
  86. Commands\OfficialAccountBillsTask::class,
  87. Commands\Temp\PayUserAutoSub::class,
  88. Commands\Temp\SelectPayUser::class,
  89. Commands\Temp\SensitiveChapter::class,
  90. Commands\SendOrder\SendStatsEmail::class,
  91. Commands\ProductStats\SendMonthStatsEmail::class,
  92. Commands\ProductStats\DailyProductionStats::class,
  93. Commands\ProductStats\MonthlyProductionStats::class,
  94. Commands\ProductStats\SendDailyProductionStats::class,
  95. Commands\ProductStats\SendMonthlyProductStats::class,
  96. Commands\SuperiorBooks\DailyScanForSupriorNewBook::class,
  97. Commands\SuperiorBooks\HistorySupriorBook::class,
  98. Commands\UserSubscribleStatistic::class,
  99. Commands\SuperiorBooks\TempCommand::class,
  100. Commands\CheckBookCover::class,
  101. Commands\fansMaximumNotice::class,
  102. Commands\BookGiftStats\BookGiftStatsByBook::class,
  103. Commands\BookGiftStats\BookGiftStatsByGift::class,
  104. Commands\MovedChannelsReback::class,
  105. Commands\WholeBookOrderData::class,
  106. Commands\ChargeTemplateStat::class,
  107. Commands\TemporaryTask::class,
  108. Commands\CheckSiteStatus::class,
  109. Commands\AutoWithdrawCash::class,
  110. Commands\ChannelReaderVisitStats::class,
  111. Commands\ChannelReaderVisitStats::class,
  112. Commands\UserPayUpdateTask::class,
  113. Commands\CheckZhangDuSiteStatus::class,
  114. Commands\YqBook::class
  115. ];
  116. /**
  117. * Define the application's command schedule.
  118. *
  119. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  120. * @return void
  121. */
  122. protected function schedule(Schedule $schedule)
  123. {
  124. //每日派单数据生成
  125. $schedule->command('send_order:generate_force_day_stat')->dailyAt("04:30");
  126. $schedule->command('bill_task')->dailyAt("00:30");
  127. //每日打款报表
  128. $schedule->command('payment_statistic_task')->dailyAt("00:30");
  129. //打款状态查询 10分钟执行一次
  130. $schedule->command('payment_query_task')->everyTenMinutes();
  131. //每日商务渠道数据报表
  132. $schedule->command('BusinessChannelStat_task')->dailyAt("00:30");
  133. //点击率
  134. $schedule->command('book:clicknumupdate')->dailyAt('01:00');
  135. //更新图书
  136. $schedule->command('book:update')->dailyAt('22:00');
  137. //未支付提醒
  138. $schedule->command('Pay:remind')->hourly();
  139. //检查公众号模板
  140. $schedule->command('CheckOfficialAccountTemplate')->hourly();
  141. //订单相关
  142. //生成渠道日统计
  143. $schedule->command('generate_order_day_stat')->dailyAt("00:05");
  144. //生成渠道汇总统计
  145. $schedule->command('generate_order_stat')->dailyAt("00:25");
  146. //订单预警
  147. $schedule->command('foa')->everyMinute();
  148. //$schedule->command('foa --qrcode')->everyMinute();
  149. //签到推送
  150. //$schedule->command('sign:reward')->everyMinute();
  151. //测试账号支付通道切换
  152. //$schedule->command('pay:change')->dailyAt('00:00');
  153. //推送统计
  154. $schedule->command('pay:wcps')->dailyAt('02:30');
  155. //托管推送
  156. $schedule->command('pay:wcps --auto')->dailyAt('05:20');
  157. //更新章节订购统计
  158. $schedule->command('book:cot')->dailyAt('01:15');
  159. //检查渠道账号状态
  160. //$schedule->command('channel_user_check_status')->dailyAt('03:30');
  161. $schedule->command('CheckAndSend')->everyMinute();
  162. // 检查公众号被封
  163. $schedule->command('ForBiddenOfficialAccountRemind')->everyFiveMinutes();
  164. //付费用户每日提醒
  165. // $schedule->command('PaidUserRemind')->dailyAt('08:00');
  166. //更新粉丝数
  167. $schedule->command('sendorderbreadforceuser')->dailyAt('02:50');
  168. //签到统计
  169. $schedule->command('sign:reward --record')->dailyAt('02:00');
  170. //cp订阅书币和充值币和赠送币
  171. $schedule->command('book:cot --type=cp')->dailyAt('02:20');
  172. //order_day_stats 阅书币和充值币和赠送币
  173. $schedule->command('book:cot --type=order')->dailyAt('02:40');
  174. //send_orders_stats 阅书币和充值币和赠送币
  175. $schedule->command('book:subds')->dailyAt('03:10');
  176. //粉丝预警
  177. $schedule->command('subscribealert --type=getTopAlert')->hourly();
  178. //强关预警
  179. $schedule->command('subscribealert --type=subscribeRateAlert')->hourly();
  180. //uv pv redis持久
  181. $schedule->command('wvs 9')->dailyAt('04:00');
  182. // 每天周报数据
  183. $schedule->command('WeeklyDailyStats all')->dailyAt('02:02');
  184. // CP
  185. // cp书籍订阅数据,需在order_day_stats后执行,每周一执行一次
  186. // $schedule->command('cp_generate_cp_book_stat')->weekly()->mondays()->at('05:10');
  187. // cp书籍订阅数据,需在order_day_stats后执行,改为每天执行一次
  188. $schedule->command('cp_generate_cp_book_stat')->dailyAt('05:10');
  189. // 自动提现申请
  190. $schedule->command('AutoWithdrawCash')->dailyAt('01:20');
  191. //自动推送托管客服消息
  192. $schedule->command('AutoSendTrusteeShipCustomerMsg')->dailyAt('19:00');
  193. //跑派单ID的24小时的uv、pv
  194. $schedule->command('send_order:set_extra_stats')->everyMinute();
  195. //分销红包
  196. $schedule->command('welfare:prize')->everyMinute();
  197. $schedule->command('welfare:nextday')->dailyAt('23:55');
  198. //服务号每日充值统计
  199. $schedule->command('official_account_bills_task')->dailyAt('05:00');
  200. //每日派单数量统计
  201. $schedule->command('book:attr')->dailyAt('04:40');
  202. //书币消耗 筛选必须在刷之后
  203. $schedule->command('temp:select_user_pay')->dailyAt('16:00');
  204. $schedule->command('temp:pay_user_auto_do')->dailyAt('06:00');
  205. //统计每周派单发送邮件
  206. $schedule->command('sendOrderEmail')->dailyAt('08:00');
  207. $schedule->command('sendMonthOrderEmail')->monthlyOn(3, '08:00');
  208. //每日作品统计
  209. //$schedule->command('saveDailyProductsStats')->dailyAt('00:10');
  210. //$schedule->command('saveMonthlyProductsStats')->monthlyOn(1, '00:20');
  211. //$schedule->command('SendDailyProductsStats')->dailyAt('08:00');
  212. $schedule->command('SendMonthlyProductsStats')->monthlyOn(1, '08:20');
  213. //优质书库
  214. $schedule->command('addSuperiorBook')->dailyAt('00:50');
  215. $schedule->command('addHistorySuperiorBook')->dailyAt('01:20');
  216. /********** 智能推送统一这里管理 ***********/
  217. //全量推送热门书籍
  218. $schedule->command('SmartPush:AllPushHotBook')->hourly()->between('6:00', '24:00');
  219. //已付费推送定制书籍
  220. $schedule->command('SmartPush:PaidPushPointBook')->hourly()->between('6:00', '24:00');
  221. //未付费推送热门书籍
  222. $schedule->command('SmartPush:UnpaidPushHotBook')->hourly()->between('6:00', '24:00');
  223. //未付费推送定制书籍
  224. $schedule->command('SmartPush:UnpaidPushPointBook')->hourly()->between('6:00', '24:00');
  225. //未支付新用户优惠充值活动(更多充值选项)
  226. $schedule->command('SmartPush:UnPaidUserBigActivity')->hourly()->between('6:00', '24:00');
  227. //未支付新用户9.9充值活动
  228. $schedule->command('SmartPush:UnPaidUserSmallActivity')->hourly()->between('6:00', '24:00');
  229. //支付用户6小时后推送客服消息
  230. $schedule->command('SmartPush:PaidUserCustom')->hourly()->between('6:00', '24:00');
  231. //测试用户推送长篇客服
  232. $schedule->command('SmartPush:LongChapterCustom')->hourly()->between('6:00', '24:00');
  233. //测试用户推送长篇模板
  234. $schedule->command('SmartPush:LongChapterTemplate')->hourly()->between('6:00', '24:00');
  235. //关注智能推送
  236. $schedule->command('CustomSubscribePush')->everyTenMinutes();
  237. //签到智能推送
  238. $schedule->command('CustomSignPush')->everyTenMinutes();
  239. /********** 智能推送 end ***********/
  240. //敏感章节生成查询
  241. $schedule->command('temp:sensitive_chapter')->dailyAt('03:20');
  242. //粉丝统计:用户强关行为统计
  243. $schedule->command('user_subscribe_statistic')->dailyAt('01:10');
  244. //强关中间表每日维护
  245. $schedule->command('MaintainTempForceSubscribeUser')->dailyAt('03:02');
  246. $schedule->command('check_book_cover_status')->weekly()->mondays()->at('04:10');
  247. //阈值提醒
  248. $schedule->command('addFansMaximumNotice')->hourly();
  249. //用户打赏统计
  250. $schedule->command('BookGiftDailyStatsByBook')->dailyAt('01:05');
  251. $schedule->command('BookGiftDailyStatsByGift')->dailyAt('01:10');
  252. $schedule->command('compensateForChannels')->everyMinute();
  253. //内外部派单按数据统计数据
  254. $schedule->command('sendOrder_book_uv_register_stat')->dailyAt('7:00');
  255. //掌中云新增站点信息采集
  256. $schedule->command('check_site_status')->dailyAt('6:00');
  257. //掌读新增站点信息采集
  258. $schedule->command('check_zhang_du_site_status')->dailyAt('6:00');
  259. //阅读页面PV 和 UV 的记录
  260. $schedule->command('channel_reader_visit_stats')->dailyAt('8:00');
  261. //更新user_pay表
  262. $schedule->command('userPayUpdateTask')->dailyAt('03:00');
  263. }
  264. }