On Unix platforms excluding AIX and Solaris, Chef creates a tempfile using the typical crontab syntax, then feeding it to the /usr/bin/crontab
command (Source).
Depending on your OS/distribution, the location varies by the cron
implementation. On Debian/Ubuntu for example (man 8 cron
):
cron searches its spool area (/var/spool/cron/crontabs) for
crontab files (which are named after accounts in /etc/passwd);
crontabs found are loaded into memory. Note that crontabs in this
directory should not be accessed directly - the crontab command should
be used to access and update them.
cron also reads /etc/crontab, which is in a slightly different format (see crontab(5)). In Debian, the content of /etc/crontab is
predefined to run programs under /etc/cron.hourly, /etc/cron.daily,
/etc/cron.weekly and /etc/cron.monthly. This configuration is spe‐
cific to Debian, see the note under DEBIAN SPECIFIC below.
Additionally, in Debian, cron reads the files in the /etc/cron.d directory. cron treats the files in /etc/cron.d as in the
same way as the /etc/crontab file (they follow the special format of
that file, i.e. they include the user field). However, they are
independent of /etc/crontab: they do not, for example, inherit environment variable settings from it. This change is specific to
Debian see the note under DEBIAN SPECIFIC below.
Like /etc/crontab, the files in the /etc/cron.d directory are monitored for changes. In general, the system administrator should not
use /etc/cron.d/, but use the standard system crontab /etc/crontab.
Long story short:
- The destination is managed by
crontab
not chef
- typical defaults for recent Debian/Ubuntu crons in 2017 are
/etc/cron.d/<filename>