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 minute queues the job but it never runs
  • atq shows jobs stuck in the queue with no execution
  • systemctl status atd shows inactive (dead) or disabled
  • journalctl -u atd shows Failed at step EXEC spawning /usr/sbin/atd
  • Applications that use at for deferred execution fail silently

Common Causes

  • atd service disabled after system upgrade or hardening procedure
  • Missing or corrupted /var/spool/cron/atjobs directory
  • at.deny file blocking all users including root
  • SELinux preventing atd from accessing spool directories
  • atd binary missing after incomplete package installation

Step-by-Step Fix

  1. 1.Check atd service status:
  2. 2.```bash
  3. 3.systemctl status atd
  4. 4.systemctl is-enabled atd
  5. 5.`
  6. 6.Enable and start the atd service:
  7. 7.```bash
  8. 8.sudo systemctl enable atd
  9. 9.sudo systemctl start atd
  10. 10.systemctl status atd
  11. 11.`
  12. 12.Verify spool directories exist with correct permissions:
  13. 13.```bash
  14. 14.ls -la /var/spool/cron/
  15. 15.sudo mkdir -p /var/spool/cron/atjobs
  16. 16.sudo mkdir -p /var/spool/cron/atspool
  17. 17.sudo chown daemon:daemon /var/spool/cron/atjobs
  18. 18.sudo chown daemon:daemon /var/spool/cron/atspool
  19. 19.sudo chmod 770 /var/spool/cron/atjobs
  20. 20.`
  21. 21.Check user access controls:
  22. 22.```bash
  23. 23.cat /etc/at.allow 2>/dev/null
  24. 24.cat /etc/at.deny 2>/dev/null
  25. 25.# If at.allow exists, only users listed there can use at
  26. 26.# If at.deny exists, listed users cannot use at
  27. 27.`
  28. 28.Test with a simple at job:
  29. 29.```bash
  30. 30.echo "echo test > /tmp/at-test.txt" | at now + 1 minute
  31. 31.atq
  32. 32.# Wait 1 minute, then check
  33. 33.cat /tmp/at-test.txt
  34. 34.`
  35. 35.Check journal for atd errors:
  36. 36.```bash
  37. 37.journalctl -u atd --since "1 hour ago" --no-pager
  38. 38.`

Prevention

  • Include atd in the list of required services in system hardening checklists
  • Monitor atd status alongside crond in system health checks
  • Use systemctl mask carefully - it should not be applied to atd
  • 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