I have atd running and have submitted jobs and received a job number, but it appears the job fails immediately as it looks like it wants to send mail:
Feb 24 20:22:43 0 atd[30592]: pam_unix(atd:session): session opened for user root by (uid=1)
Feb 24 20:22:43 0 atd[30592]: pam_unix(atd:session): session closed for user root
Feb 24 20:22:43 0 atd[30592]: Exec failed for mail command: No such file or directory
I do not have a /etc/at.allow, but instead just have /etc/at.deny, so I doubt that is the issue. The executable I am trying to run does work if I invoke it directly, but not with at.
I have tried running at in debug mode with:
atd -d -f
with the hopes that I would see something useful, but I didn't get any output when invoking the job again.
I was struggling to understand what's wrong in my case. I actually use Ansible module for
at
.What I noticed is atd creates a files in directory
/var/spool/cron/atjobs/
for each task with exact Shell script the daemon suppose to run.One can run this script to get more details about error. It turned out in my case Ansible changes current dir to some temp dir and this dir was deleted before timer fires.