You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

AzureRM维护配置:如何指定周六作为Update Manager运行日?

问题

尝试为Azure Update Manager创建维护配置时,无法指定期望的运行日期——是否需要在其他位置配置?

默认情况下检查会在周一运行,我希望改为周六。window块仅提供以下选项:start_date_time、expiration_date_time、duration、time_zone、recur_every。

我尝试将start_date_time设置为周六,并将recur_every设为Week,但没有效果。想请教在哪里可以配置维护周期的运行星期几?

以下是使用的Terraform示例代码:

resource "azurerm_maintenance_configuration" "maintenance" {
  name                = "test-${var.environment}-${var.location}"
  resource_group_name = var.resource_group_name
  location            = var.location
  scope               = "InGuestPatch"

  install_patches {
    linux {
      classifications_to_include = [ "Critical", "Security", "Other" ]
    }
    reboot = "IfRequired"
  }
  in_guest_user_patch_mode = "User"

  window {
    start_date_time = "2025-01-11 00:00"
    time_zone = "GMT Standard Time"
    recur_every = "Week"
    duration    = "03:00"
  }
}
解决方案

问题出在recur_every的配置方式上,需要明确指定每周的具体星期几,而非仅写Week。

  • 将recur_every的值改为"Week Saturday",即可让维护任务从指定的周六开始,每周六重复运行。
  • 确保start_date_time确实为周六日期(你使用的2025-01-11符合要求),配合recur_every = "Week Saturday"就能生效。

修改后的window块示例:

window {
  start_date_time = "2025-01-11 00:00"
  time_zone       = "GMT Standard Time"
  recur_every     = "Week Saturday"
  duration        = "03:00"
}

Azure维护配置的recur_every字段支持扩展语法,当周期为周时,可追加英文星期名称(如Saturday、Sunday)来指定具体运行日期。仅写Week会默认沿用系统的周一周期,因此无法达到预期效果。

内容的提问来源于stack exchange,提问作者Matty

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.14 23:17:42