powershell - 在 Azure Devops 的计划中执行 exe

标签 powershell azure-devops scheduled-tasks exe

有没有办法在 azure devops 中按计划(每周一次/两次)执行 exe。无法找到正确的任务来实现这一目标。

最佳答案

Is there a way to execute an exe on a scheduled basis (once/twice everyday of the week) in azure devops



答案是肯定的。

我们可以添加 Command Line从命令提示符运行程序的构建或发布管道中的任务,指定 .exe来自您的存储库位置的控制台应用程序,例如:"$(Build.SourcesDirectory)\Tools\ConsoleApp.exe" :

enter image description here

那么 ,我们移至 触发 选项卡,有一个选项 预定 ,我们可以设置预定的基础:

enter image description here

如果你想安排任务/构建 两次一周中的每一天,您都可以再添加一个时间表。

更新:

How to add app configs specific to each envs here in this step? Any idea?



您可以通过多阶段的发布管道来实现它:

Define your multi-stage continuous deployment (CD) pipeline

每个环境的每个阶段。

Additionally this requires a build every time correct? Is there a way to eliminate that?



是的,这需要每次构建,否则,将没有触发器来运行 .exe .

希望这可以帮助。

关于powershell - 在 Azure Devops 的计划中执行 exe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60625045/

相关文章:

powershell - 如何使用 PowerShell 部署到 Azure 应用服务?

azure - 如何通过工作流 ID 查找逻辑应用/工作流名称?

.net - 管理自动化 .NET 代码执行的最佳实践

JavaFX 任务调度和并发

在变量中存储 cmdlet 响应时出现 PowerShell 编码问题

powershell - 使用powershell替换文本文件中的扩展ascii字符

c++ - 如何在 GitHub 存储库的团队服务构建中链接第三方库 (.lib)?

tfs - 在两个代理阶段之间传递发布变量

powershell - 如何在 Azure Devops 管道中以管理员权限运行 PowerShell 任务

c - FreeRTOS 优先级 1 有什么特别之处?