opnsense_settings_cron (Resource)

Manage an OPNsense cron job.

Example Usage

resource "opnsense_settings_cron" "nightly_run" {
  enabled     = false
  minutes     = "37"
  hours       = "2"
  days        = "*"
  months      = "*"
  weekdays    = "*"
  who         = "root"
  command     = "firmware auto-update"
  parameters  = ""
  description = "Run nightly system backup at 2:30 AM"
}

Schema

Required

  • command (String) Command or action to execute (e.g., script path or named action).

Optional

  • days (String) Cron day-of-month field (e.g., *, 1, 1-31). Defaults to *.
  • description (String) Optional description for your reference.
  • enabled (Boolean) Whether this cron job is enabled. Defaults to true.
  • hours (String) Cron hours field (e.g., *, 0, 0-23, */2). Defaults to *.
  • minutes (String) Cron minutes field (e.g., *, 0, */5, 0,30). Defaults to *.
  • months (String) Cron month field (e.g., *, 1, 1-12). Defaults to *.
  • parameters (String) Optional parameters passed to the command.
  • weekdays (String) Cron day-of-week field (e.g., *, 0, 1-5, mon-fri). Defaults to *.
  • who (String) User to run the command as. Defaults to root.

Read-Only

  • id (String) UUID of the cron job.