Last active
June 28, 2018 01:13
-
-
Save IlyaFinkelshteyn/9c74bb82c97130565e612389c08bca9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$env:API_TOKEN = "<replace>" # from https://ci.appveyor.com/api-token | |
$env:APPVEYOR_ACCOUNT_NAME = "<replace>" # from AppVeyor project URL | |
$env:APPVEYOR_PROJECT_SLUG = "<replace>" # from AppVeyor project URL | |
$env:CRONTAB_EXPRESSION = "<replace>" # e.g. "5 * * * *" | |
$headers = @{ | |
"Authorization" = "Bearer $env:API_TOKEN" | |
"Content-type" = "application/json" | |
} | |
$s = Invoke-RestMethod -Uri "https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/settings" -Headers $headers -Method Get | |
$s.settings.scheduleCrontabExpression = $env:CRONTAB_EXPRESSION | |
Invoke-RestMethod -Uri 'https://ci.appveyor.com/api/projects' -Headers $headers -Body ($s.settings | ConvertTo-Json -Depth 10) -Method Put |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment