
at (アット)は、 Unix系 オペレーティングシステムのコマンドであり、任意のコマンドを任意の指定した時間に1回実行するようスケジュールする。 at (At) is, Unix commands and computer operating systems, any command at the specified time schedule to perform any one time.
より正確に言えば、一連のコマンド行を標準入力から読み込み、後日実行される "at-job" としてそれらをまとめる。 To put it more accurately, read from the input lines to standard set of commands to be executed at a later date "at-job" as they put together. at-job は現在の環境を継承するので、 ワーキングディレクトリや環境変数をスケジュール設定時と同じにして実行される。 Because at-job will inherit the environment of the current execution and the same time schedule the working directory and environment variables.
cronは、これとは異なり、繰り返し実行する場合に使われる(一時間おきとか、毎週火曜日とか、毎年1月1日など)。 cron is different and this is used if you want to repeat (or one every hour, or every Tuesday, January 1 every year and day). cronと同様、多くのUNIXシステムでatコマンドのスーパーユーザー以外の使用を制限している。 cron like many UNIX systems at that restrict the use of non-superuser command.
atはスケジュールされた一連のジョブを実行したときにユーザーに電子メールを送信することができ、ジョブキューを複数使ったり、標準入力以外のファイルからジョブのリストを読み込んだりできる。 at the e-mail can be sent to the user when running the job is a set schedule, or using multiple job queue, jobs that can read a list of files other than standard input. 例えば、 C言語のプログラムを午前11:45にコンパイルするコマンドを実行し、結果(標準出力と標準エラー出力)をユーザーIDに対してメールで通知するには、以下のようにする。 For example, C am to 11:45 language programs run commands to compile the results (standard output and standard error) to be notified by e-mail user ID is to be as follows.
echo "cc -o foo foo.c" | at 1145 echo "cc-o foo foo.c" | at 1145
atがスケジュールしたジョブの実行のため、 atdというデーモンが定期的にジョブリストをチェックし、実行すべき時刻がきたジョブを起動する。 at a scheduled job to run atd atd to check the job list to be daemon that periodically, the time has come to start the job to be performed.
atの代わりにbatchコマンドを使うと、 ロードアベレージがある値より低い場合のみ、スケジュールされたジョブを実行するようになる(高負荷の場合は実行しない)。 at the place of the batch and use the command only if there is lower than the average load, which was scheduled to perform the job (if you do not run high-load).
Windows NT / 2000 / XPにはcronに類似したatコマンドがあるが、 タスクスケジューラの方が有名である。 Windows NT / 2000 / XP to cron at that there is a command, is known better in Task Scheduler.
| ||||||||||||||||||||||||||
