Linux

Where Are Cron Jobs Stored on Linux?

Where cron keeps per user crontabs and system schedules on Linux, and why you should edit them with crontab.

Last updated

User cron jobs live in spool files: /var/spool/cron/crontabs/<user> on Debian and Ubuntu, /var/spool/cron/<user> on RHEL family systems. System wide schedules sit separately in /etc/crontab, /etc/cron.d/ and the cron.hourly/daily/weekly/monthly folders.

Edit with crontab -e, never by hand. The command validates syntax and signals the daemon; hand editing the spool file risks a reload miss or a permissions break. List with crontab -l when auditing a machine you inherited, since undocumented jobs hide there for years.

Where cron stores this, by platform

Linux
/var/spool/cron/crontabs

Needs sudo to read other users files. System schedules in /etc/crontab and /etc/cron.d carry a user column that personal crontabs lack. Logs go to the journal or /var/log/syslog depending on distro.

Frequently asked questions

My cron job runs fine by hand but never fires. Why?

Almost certainly environment. Cron runs with a minimal PATH and no shell profile, so bare command names and ~ references that work in your terminal fail silently. Use absolute paths everywhere and redirect output to a log file until the job proves itself.

How do I see what cron actually did?

Check the system log: journalctl -u cron (or crond) on systemd machines, /var/log/syslog or /var/log/cron on others. Cron mails output to the local mailbox when MAILTO is unset, so check mail too. Silent jobs are usually logging somewhere unexpected, not nowhere.

Notice an outdated path? Let us know.