# Unexpected behavior with cron

**URL:** <https://forum.ansible.com/t/unexpected-behavior-with-cron/35557>\
**Category:** Ansible Project\
**Tags:** awx\
**Created:** [July 28, 2021, 1:52pm UTC](https://forum.ansible.com/t/unexpected-behavior-with-cron/35557 "2021-07-28T13:52:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_van\_Santen](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@Michael\_van\_Santen](https://forum.ansible.com/u/Michael_van_Santen)\
**Post date:** [July 28, 2021, 1:52pm UTC](https://forum.ansible.com/t/unexpected-behavior-with-cron/35557/1 "2021-07-28T13:52:31Z")

</div>

Hey folks,  
we recently performed an Upgrade of Ansible, or to be more specific an upgrade of AWX.  
We went from AWX 17 to AWX 19.2.0 which also updated the Ansible version

After the Upgrade we get the following fatal error for every job about configuring cron:  
“Will not manage /etc/crontab via cron\_file, see documentation.”

This is a configuration we get the error with:

- name: Remove specific cronjob  
ansible.builtin.cron:  
name: “specific cronjob”  
user: “root”  
cron\_file: “/etc/crontab”  
job: “some command &\>/dev/null”  
state: absent

We checked the documentation but our configuration seems to be okay, also it worked in the previous version.  
Has anyone experienced this or has a guess what’s going on?

Regards  
Michael

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [July 28, 2021, 1:57pm UTC](https://forum.ansible.com/t/unexpected-behavior-with-cron/35557/2 "2021-07-28T13:57:11Z")

</div>

You appear to be running the devel version of ansible-core, the unreleased 2.12. That change has not been included in a published version yet.

So the docs will appear at [https://docs.ansible.com/ansible-core/devel/collections/ansible/builtin/cron\_module.html](https://docs.ansible.com/ansible-core/devel/collections/ansible/builtin/cron_module.html)

The documentation reads:

> The assumption is that this file is exclusively managed by the module, do not use if the file contains multiple entries, NEVER use for /etc/crontab

This change was made in [https://github.com/ansible/ansible/pull/73591](https://github.com/ansible/ansible/pull/73591) to resolve [https://github.com/ansible/ansible/issues/37355](https://github.com/ansible/ansible/issues/37355)
