cron куча вопросов

Привет. Разбираюсь с кроном
По умолчанию стоит какой-то Dillon's Cron.

0) /etc/cron.d/* и /var/spool/cron/* работают нормально.
1) Почему-то /etc/crontab не обрабатывается. Вот его содержимое:
* * * * *       root     echo `date` "/etc/crontab">>/var/log/testcron.log
Никаких ошибок или упоминаний в логе. /etc/crontab что, отменили?
2) Всё же, по правилам, должно ли стоять имя пользователя перед командой?
format of /etc/crontab? http://lists.freebsd.org/pipermail/freebsd-doc/2003-July/001236.html
On Thu, Jul 03, 2003 at 01:54:36PM -0700, Rich Morin wrote:
> The cron(8) man page (on my FreeBSD 4.7 system) says:
>
> Cron searches /var/cron/tabs for crontab files which are named after
> accounts in /etc/passwd; crontabs found are loaded into memory. Cron
> also searches for /etc/crontab which is in a different format (see
> crontab(5)).
>
> The crontab(5) man page, however, says nothing about any differences in
> the file formats. Instead, it appears to describe only the format that
> is used in /var/cron/tabs/* files.
>
> I would like to know precisely how the format of /etc/crontab differs,
> but I can't find any man page that addresses this. Help?

Hmm, cron(8) mentions that /etc/crontab is in a difference format and
refrences crontab(5), but you seems to be correct that crontab(5)
doesn't mention the differences. I'm fairly sure the only difference is
the who field between the time and command specifications. A bit of
digging in the cron code found this comment:

/* this function reads one crontab entry – the next – from a file.
* it skips any leading blank lines, ignores comments, and returns
* EOF if for any reason the entry can't be read and parsed.
*
* the entry is also parsed here.
*
* syntax:
* user crontab:
* minutes hours doms months dows cmd\n
* system crontab (/etc/crontab):
* minutes hours doms months dows USERNAME cmd\n
*/

– Brooks
вот работающая строчка с моего вайфай роутера, на котором установлен ISC Cron V4.1
0 0 * * * admin /opt/sbin/logrotate -f /opt/etc/logrotate.conf &>/dev/null
( admin это переименованный root )
man crontab читаем до посинения
Разберемся, голубчик!
 
Зарегистрироваться или войдите чтобы оставить сообщение.