代码提交指标
生成随机数文件,确保每次都有差别
设置文件路径
$filePath = "C:\Users\random_numbers.txt"
# 无限循环
while ($true) {
# 生成随机数
$randomNumber = Get-Random
获取当前时间戳
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
将随机数和时间戳写入文件
"$timestamp - Random Number: $randomNumber" | Out-File -FilePath $filePath -Append
在控制台显示OK
Write-Host "OK"
等待1秒
Start-Sleep -Seconds 1
}
提交
初始化提交次数计数器
$commitCount = 0
无限循环
while ($true) {
git commit -m "bgfxs" -a
$commitCount++
推送到远程仓库
git push
Write-Host "Git commit and push completed. (Commit count: $commitCount)"
等待一段时间(例如1秒)再次执行
Start-Sleep -Seconds 1
}

浙公网安备 33010602011771号