#85584·ansible

cron: allow custom cron cmd

Author: BPplaysCreated Jul 29, 2025Updated Sep 24, 2026
Labelsmodulehas_prfeature

Summary

i am using fcron and it uses fcrontab instead of crontab, symlinking /usr/local/sbin/crontab to /usr/sbin/fcrontab seems to make ansible.builtin.cron work but i would like the option to manually specify to use fcrontab

Issue Type

Feature Idea

Component Name

ansible.builtin.cron

Additional Information

if it isn't an absolute path it should probably be treated as a bin and used with get_bin_path like it currently does for the hard coded 'crontab'

yaml
        - name: cron job
          become: true
          become_user: root
          cron:
            name: "echo"
            cron_cmd: "fcrontab"
            minute: "0"
            hour: "6"
            job: "echo 'cron'"
            state: present

but an absolute path should also be an option

yaml
        - name: cron job
          become: true
          become_user: root
          cron:
            name: "echo"
            cron_cmd: "/usr/sbin/fcrontab"
            minute: "0"
            hour: "6"
            job: "echo 'cron'"
            state: present

Code of Conduct

  • I agree to follow the Ansible Code of Conduct