.\"/* Copyright 1988,1990,1993 by Paul Vixie .\" * All rights reserved .\" * .\" * Distribute freely, except: don't remove my name from the source or .\" * documentation (don't take credit for my work), mark your changes (don't .\" * get me blamed for your possible bugs), don't alter or remove this .\" * notice. May be sold if buildable source is provided to buyer. No .\" * warrantee of any kind, express or implied, is included with this .\" * software; use at your own risk, responsibility for damages (if any) to .\" * anyone resulting from the use of this software rests entirely with the .\" * user. .\" * .\" * Send bug reports, bug fixes, enhancements, requests, flames, etc., and .\" * I'll try to keep a version up to date. I can be reached as follows: .\" * Paul Vixie uunet!decwrl!vixie!paul .\" */ .\" .\" %Id: cron.8,v 1.6 1998/03/23 08:21:07 charnier Exp % .\" jpman %Id: cron.8,v 1.2 1997/04/18 06:33:14 yugawa Stab % .\" .Dd December 20, 1993 .Dt CRON 8 .Os .Sh 名称 .Nm cron .Nd 定期的にコマンドを実行するデーモン (Vixie Cron) .Sh 書式 .Nm cron .Op Fl x Ar debugflag Ns Op ,... .Sh 解説 .Nm は、通常は .Pa /etc/rc もしくは .Pa /etc/rc.local から起動されます。このコマンドは実行するとすぐに返ってくるので、起動時に `&' をつける必要はありません。 .Pp .Nm は、 .Pa /var/cron/tabs ディレクトリの下から .Pa /etc/passwd 内のアカウント名と同じ名前の crontab ファイルを探し、見つかったファイルを メモリに読み込みます。 .Nm は、別のフォーマットの .Pa /etc/crontab ( .Xr crontab 5 を参照してください) も調べます。このあと、 .Nm は 1 分おきに目覚めて 読み込んでいるすべての crontab ファイルを調べ、各コマンドをその時刻に 実行させるべきかどうかを調べます。コマンドを実行する場合には、出力がメールで crontab ファイルの所有者 (もしくは crontab ファイル内の環境変数 .Ev MAILTO で指定されたユーザ) に送られます。 .Pp さらに、 .Nm は 1 分おきにスプールディレクトリの最終更新時刻 ( .Pa /etc/crontab の最終更新時刻も ) が変わっているかどうかを調べます。もし 変化があれば、すべての crontab ファイルの最終更新時刻を調べ、変更のあった ものを読み直します。このため、crontab ファイルを変更したときに .Nm をリスタートさせる必要はありません。 .Xr crontab 1 コマンドが crontab ファイルを変更したときにスプールディレクトリの最終更新時刻も更新されることに 注意して下さい。 .Sh 関連項目 .Xr crontab 1 , .Xr crontab 5 .Sh 作者 .An Paul Vixie Aq paul@vix.com