zester
GuidesModules

cron.absent

Ensures a crontab entry does not exist for a user.

Parameters

ParameterTypeDefaultDescription
namestringstate IDLabel for the state
userstringrootUser whose crontab is managed
commandstringRequired. Command to remove
requirelistRequisite states

Example

remove-legacy-backup:
  cron.absent:
    - user: root
    - command: /usr/local/bin/old_backup.sh

Behaviour

  • Check: returns NeedsChange if an entry matching the command exists.
  • Apply: removes the entry.
  • Revert: no-op (cannot restore a deleted cron entry).

On this page