powershell - 在 Azure 中运行 PowerShell 脚本作为任务计划程序,无需创建任何虚拟机

标签 powershell azure scripting azure-automation azure-scheduler

我有一个 PowerShell 脚本,希望每 6 小时运行一次,作为 Azure 上的任务计划程序。但担心的是我不需要任何虚拟机。那么有没有什么方法可以在不创建任何虚拟机的情况下完成呢?

最佳答案

您可以通过多种选择在 Azure 中执行此操作。

1.正如 Gaurav Mantri 所说,您可以使用 Azure 自动化,您可以创建一个 Runbook 并安排它在指定时间启动。更多信息请引用这个link .

2.使用Azure Function App。您可以创建一个 TimerTrigger - PowerShell,如下所示:

enter image description here

更多信息请引用此link .

注意:Azure 自动化和函数应用均提供免费单位(每月)

希望有帮助。

关于powershell - 在 Azure 中运行 PowerShell 脚本作为任务计划程序,无需创建任何虚拟机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47529307/

相关文章:

powershell - Sitecore Powershell : items with multiple fields with the same name

regex - 需要从批处理中的 epub 或文本文件中提取一组 4 位数字

c++ - 用于嵌入式脚本/文本处理引擎的 Python vs Lua

php - Magento - 在脚本中积累自定义选项

powershell - Get-ACL重复组-Powershell

c# - 尝试在 Powershell v1 中嵌入 C# 代码

powershell - 错误: "Select-AzureSubscription Must specify a non-null subscription name"

azure - 如何为一个 Azure 网站保留实例配置多个主机 header

sql-server - 给定 Azure 中 SQL 数据库上的 SQL 查询的查询 ID,是否有办法返回并跟踪谁发起了查询?

scripting - 我有办法检查 Ant 中是否存在目录(不是文件)吗?