request_script.sh 472 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # 将特定的命令列表赋给变量
  3. COMMANDS=(
  4. "/usr/bin/php81/php artisan buildStory"
  5. "/usr/bin/php81/php artisan buildTitle"
  6. "/usr/bin/php81/php artisan buildKeyword"
  7. "/usr/bin/php81/php artisan buildSd"
  8. "/usr/bin/php81/php artisan getOpensdDetail"
  9. "/usr/bin/php81/php artisan buildPinyin"
  10. )
  11. while true
  12. do
  13. for command in "${COMMANDS[@]}"
  14. do
  15. $command # 执行特定命令
  16. done
  17. sleep 5 # 休眠5秒
  18. done