简体   繁体   English

Azure自动化复杂计划

[英]Azure Automation Complex Schedule

Is there a way we can specify a Complex Schedule for an Azure Automation Runbook? 有没有办法为Azure自动化Runbook指定复杂计划?

Currently we can only configure if the Runbook needs to run Hourly,Daily,Weekly / Monthly. 目前我们只能配置Runbook是否需要按小时,每日,每周/每月运行。 I want to set up something like "Run from Tuesday to Saturday, Daily at 1 PM". 我想设置一些类似“从周二到周六运行,每日下午1点”的内容。

Only way I can think of right now is to code it inside the RunBook. 我现在唯一能想到的就是在RunBook中编写代码。

Please let me know if there's any other way. 如果还有其他方法,请告诉我。

Thanks 谢谢

Automation offers weekly and monthly schedules in the new Azure portal. 自动化在新的Azure门户中提供每周和每月计划。 This service announcement talks a bit about how you can use weekly/monthly schedules to do what you are looking for. 此服务公告谈论了如何使用每周/每月计划来完成您正在寻找的内容。 You can also use the New-AzureRMAutomationSchedule cmdlet to create weekly schedules and specify the days (use the ByWeekly parameter set). 您还可以使用New-AzureRMAutomationSchedule cmdlet创建每周计划并指定日期(使用ByWeekly参数集)。

WeeklySchedules

You have to write custom powershell script within your runbook and schedule your runbook to run every hour or probably everyday at 1PM. 您必须在Runbook中编写自定义PowerShell脚本,并安排Runbook每小时或每天下午1点运行。

The custom powershell script will have code which checks if a day is NOT Sunday, Monday and Saturday! 自定义PowerShell脚本将具有检查一天是否不是星期日,星期一和星期六的代码!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM