Introduction
While the main cron daemon (crond) handles recurring scheduled tasks, the atd daemon manages one-time scheduled jobs via the at and batch commands. Some cron implementations and system workflows depend on atd being available. When atd is disabled, stopped, or fails to start, one-time jobs queue up but never execute, and dependent system functions break silently.
Symptoms
at now + 1 minutequeues the job but it never runsatqshows jobs stuck in the queue with no executionsystemctl status atdshowsinactive (dead)ordisabledjournalctl -u atdshowsFailed at step EXEC spawning /usr/sbin/atd- Applications that use
atfor deferred execution fail silently
Common Causes
atdservice disabled after system upgrade or hardening procedure- Missing or corrupted
/var/spool/cron/atjobsdirectory at.denyfile blocking all users including root- SELinux preventing
atdfrom accessing spool directories atdbinary missing after incomplete package installation
Step-by-Step Fix
- 1.Check atd service status:
- 2.```bash
- 3.systemctl status atd
- 4.systemctl is-enabled atd
- 5.
` - 6.Enable and start the atd service:
- 7.```bash
- 8.sudo systemctl enable atd
- 9.sudo systemctl start atd
- 10.systemctl status atd
- 11.
` - 12.Verify spool directories exist with correct permissions:
- 13.```bash
- 14.ls -la /var/spool/cron/
- 15.sudo mkdir -p /var/spool/cron/atjobs
- 16.sudo mkdir -p /var/spool/cron/atspool
- 17.sudo chown daemon:daemon /var/spool/cron/atjobs
- 18.sudo chown daemon:daemon /var/spool/cron/atspool
- 19.sudo chmod 770 /var/spool/cron/atjobs
- 20.
` - 21.Check user access controls:
- 22.```bash
- 23.cat /etc/at.allow 2>/dev/null
- 24.cat /etc/at.deny 2>/dev/null
- 25.# If at.allow exists, only users listed there can use at
- 26.# If at.deny exists, listed users cannot use at
- 27.
` - 28.Test with a simple at job:
- 29.```bash
- 30.echo "echo test > /tmp/at-test.txt" | at now + 1 minute
- 31.atq
- 32.# Wait 1 minute, then check
- 33.cat /tmp/at-test.txt
- 34.
` - 35.Check journal for atd errors:
- 36.```bash
- 37.journalctl -u atd --since "1 hour ago" --no-pager
- 38.
`
Prevention
- Include
atdin the list of required services in system hardening checklists - Monitor
atdstatus alongsidecrondin system health checks - Use
systemctl maskcarefully - it should not be applied toatd - Document all scheduled tasks, including both cron and at jobs, in a central registry
- Use monitoring tools that alert on queued but unexecuted at jobs