Debian 11 · PHP 7.4 · MySQL 5.7

GitHub 仓库自动创建

按倒序读取 gh_ask 中待处理记录,通过 GitHub API 创建仓库,成功后自动更新状态。

01 启动脚本

进入目录后赋予执行权限并运行:

chmod +x loop_create_repo.sh
./loop_create_repo.sh

02 后台运行

需要长期运行时,可使用 nohup:

nohup ./loop_create_repo.sh \
>> run.log 2>&1 &

03 查看日志

运行日志会写入 run.log,可实时查看:

tail -f run.log

运行状态

0创建成功,1 秒后继续
2API 错误,35 分钟后继续
3暂无待处理记录,10 秒后继续
1其他错误,60 秒后继续