|
|
@@ -16,10 +16,14 @@ class GlobalController extends Controller
|
|
|
public function actionRun()
|
|
|
{
|
|
|
|
|
|
- //所有门店进行库存通知
|
|
|
- ProductClass::allShopStockWarningFromQueue();
|
|
|
+ //每5分钟执行一次,所有门店库存预警
|
|
|
+ $hour = (int)date("H");
|
|
|
+ if ($hour >= 7 and $hour <= 23) {
|
|
|
+ if ((int)date('i') % 5 == 0) {
|
|
|
+ ProductClass::allShopStockWarningFromQueue();
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
}
|