|
@@ -1,15 +1,21 @@
|
|
-API_ENDPOINTS=(
|
|
|
|
- "https://hb.swdz.com/api/ai/buildStory"
|
|
|
|
- "https://hb.swdz.com/api/ai/buildTitle"
|
|
|
|
- "https://hb.swdz.com/api/ai/buildKeyword"
|
|
|
|
- "https://hb.swdz.com/api/ai/buildSd"
|
|
|
|
- "https://hb.swdz.com/api/ai/getOpensdDetail"
|
|
|
|
- "https://hb.swdz.com/api/ai/buildPinyin"
|
|
|
|
|
|
+#!/bin/bash
|
|
|
|
+
|
|
|
|
+# 将特定的命令列表赋给变量
|
|
|
|
+COMMANDS=(
|
|
|
|
+ "php artisan buildStory"
|
|
|
|
+ "php artisan buildTitle"
|
|
|
|
+ "php artisan buildKeyword"
|
|
|
|
+ "php artisan buildSd"
|
|
|
|
+ "php artisan getOpensdDetail"
|
|
|
|
+ "php artisan buildPinyin"
|
|
)
|
|
)
|
|
|
|
|
|
-while true; do
|
|
|
|
- for endpoint in "${API_ENDPOINTS[@]}"; do
|
|
|
|
- curl -s "$endpoint" # 发送HTTP请求,-s选项用于静默模式
|
|
|
|
|
|
+while true
|
|
|
|
+do
|
|
|
|
+ for command in "${COMMANDS[@]}"
|
|
|
|
+ do
|
|
|
|
+ $command # 执行特定命令
|
|
done
|
|
done
|
|
- sleep 5 # 休眠1秒
|
|
|
|
|
|
+
|
|
|
|
+ sleep 5 # 休眠5秒
|
|
done
|
|
done
|