crontab and atrun

gumse

Member
When putting the line:
*/1 * * * * root /usr/libexec/atrun
in root's crontab i get this mail every minute:

Message 1:
From root Thu May 3 23:12:00 2001
Date: Thu, 3 May 2001 23:12:00 +0200 (CEST)
From: root (Cron Daemon)
To: root
Subject: Cron <root@localhost> root /usr/libexec/atrun
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/var/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>

zsh: command not found: root

This works fine on my other BSD boxes.
Any hints ?
 
You are expecting a field "user" in your crontab and entered "root", but there's no such field in OSX's crontab. So you are trying to run the command:

root /usr/libexec/atrun

Just remove the "root" and you should be fine.

Oh, and by the way, there's a crontab gui called CronniX available at
www.koch-schmidt.de/cronnix

Sven
 
Thanks a lot,
Now my root-crontab works, and the at command to.

Another question, I have tried to create cron.deny and at.deny in /etc/cron.d and /usr/lib/cron , but it seems to be the wrong places, do you know where OS-X wants them ?
 
Try

/var/cron/allow
/var/cron/deny

Have a look at "man crontab" for more details.

Sven
 
Hehe RTFM , serves me right, looked so much at man cron so I missed man crontab.

Again, it works perfectly, thanks Sven.
 
And remember to create /var/at/at.deny and the directory /var/at/spool, for the at command to work ok.
 
Back
Top