debianのcronがわからない

/etc/cron.hourlyにスクリプトを放り込むのか、それとも各ユーザでcrontab -eをするのか、どっちなんだ。cron(8)見たけどよくわからんかった。
/etc/crontabを見たら/etc/cron.*/*を全部実行するようになっていたけど、どうなってんだ。


Debianによれば、一般ユーザ権限で動かしたい場合は、/etc/cron.d/whateverを作っておけば問題ないようだが、なんか動かない。それ以前にrootユーザで動いてないような…。

Any jobs under the purview of the system administrator should be in /etc, since they are configuration files. If you have a root cron job for daily, weekly, or monthly runs, put them in /etc/cron.{daily,weekly,monthly}. These are invoked from /etc/crontab, and will run in alphabetic order, which serializes them.

On the other hand, if you have a cron job that (a) needs to run as a special user, or (b) needs to run at a special time or frequency, you can use either /etc/crontab, or, better yet, /etc/cron.d/whatever. These particular files also have an extra field that allows you to stipulate the user account under which the cron job runs.

In either case, you just edit the files and cron will notice them automatically. There is no need to run a special command. For more information see cron(8), crontab(5), and /usr/share/doc/cron/README.Debian.

/var/log/syslogや/var/mail/usernameを見ていると、どうもcrontab -eで設定した方が動いているようにも見えている…。