内に含まその他のドキュメントサポート リソース | PDF 文書ファイルをダウンロードする (6561 KB)
at(1)Name | Synopsis | Description | Options | Operands | Usage | Examples | Environment Variables | Exit Status | Files | Attributes | See Also | Notes Name
Synopsis
/usr/bin/at [-c | -k | -s] [-m] [-f file] [-p project]
[-q queuename] -t time
/usr/bin/at [-c | -k | -s] [-m] [-f file] [-p project]
[-q queuename] timespec...
/usr/bin/at -l [-p project] [-q queuename] [at_job_id. ..] /usr/bin/at -r at_job_id. .. /usr/bin/batch [-p project]
/usr/xpg4/bin/at [-c | -k | -s] [-m] [-f file] [-p project]
[-q queuename] -t time
/usr/xpg4/bin/at [-c | -k | -s] [-m] [-f file] [-p project]
[-q queuename] timespec...
/usr/xpg4/bin/at -l [-p project] [-q queuename]
[at_job_id. ..]
/usr/xpg4/bin/at -r at_job_id. .. /usr/xpg4/bin/batch [-p project] DescriptionatThe at utility reads commands from standard input and groups them together as an at-job, to be executed at a later time. The at-job is executed in a separate invocation of the shell, running in a separate process group with no controlling terminal, except that the environment variables, current working directory, file creation mask (see umask(1)), and system resource limits (for sh and ksh only, see ulimit(1)) in effect when the at utility is executed is retained and used when the at-job is executed. When the at-job is submitted, the at_job_id and scheduled time are written to standard error. The at_job_id is an identifier that is a string consisting solely of alphanumeric characters and the period character. The at_job_id is assigned by the system when the job is scheduled such that it uniquely identifies a particular job. User notification and the processing of the job's standard output and standard error are described under the -m option. Users are permitted to use at and batch (see below) if their name appears in the file /usr/lib/cron/at.allow. If that file does not exist, the file /usr/lib/cron/at.deny is checked to determine if the user should be denied access to at. If neither file exists, only a user with the solaris.jobs.user authorization is allowed to submit a job. If only at.deny exists and is empty, global usage is permitted. The at.allow and at.deny files consist of one user name per line. cron and at jobs are not be executed if the user's account is locked. Only accounts which are not locked as defined in shadow(4) will have their job or process executed. batchThe batch utility reads commands to be executed at a later time. Commands of the forms:
are respectively equivalent to:
where queue b is a special at queue, specifically for batch jobs. Batch jobs are submitted to the batch queue for immediate execution. Execution of submitted jobs can be delayed by limits on the number of jobs allowed to run concurrently. See queuedefs(4). Options
If the -c, -k, or -s options are not specified, the SHELL environment variable by default determines which shell to use. For /usr/xpg4/bin/at and /usr/xpg4/bin/batch, if SHELL is unset or NULL, /usr/xpg4/bin/sh is used. For usr/bin/at and /usr/bin/batch, if SHELL is unset or NULL, /bin/sh is used. The following options are supported: Operands
The following operands are supported: UsageThe format of the at command line shown here is guaranteed only for the "C" locale. Other locales are not supported for midnight, noon, now, mon, abmon, day, abday, today, tomorrow, minutes, hours, days, weeks, months, years, and next. Since the commands run in a separate shell invocation, running in a separate process group with no controlling terminal, open file descriptors, traps and priority inherited from the invoking environment are lost. ExamplesatExample 1 Typical Sequence at a TerminalThis sequence can be used at a terminal:
Example 2 Redirecting OutputThis sequence, which demonstrates redirecting standard error to a pipe, is useful in a command procedure (the sequence of output redirection specifications is significant):
Example 3 Self-rescheduling a JobTo have a job reschedule itself, at can be invoked from within the at-job. For example, this "daily-processing" script named my.daily runs every day (although crontab is a more appropriate vehicle for such work):
Example 4 Various Time and Operand PresentationsThe spacing of the three portions of the "C" locale timespec is quite flexible as long as there are no ambiguities. Examples of various times and operand presentations include:
batchExample 5 Typical Sequence at a TerminalThis sequence can be used at a terminal:
Example 6 Redirecting OutputThis sequence, which demonstrates redirecting standard error to a pipe, is useful in a command procedure (the sequence of output redirection specifications is significant):
Environment Variables
See environ(5) for descriptions of the following environment variables that affect the execution of at and batch: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, NLSPATH, and LC_TIME. Exit Status
The following exit values are returned: Files
AttributesSee attributes(5) for descriptions of the following attributes: /usr/bin/at/usr/xpg4/bin/at/usr/bin/batch/usr/xpg4/bin/batchSee Alsoauths(1), crontab(1), csh(1), date(1), ksh(1), sh(1), touch(1), ulimit(1), umask(1), cron(1M), getdate(3C), auth_attr(4), shadow(4), queuedefs(4), attributes(5), environ(5), standards(5) NotesRegardless of queue used, cron(1M) has a limit of 100 jobs in execution at any time. There can be delays in cron at job execution. In some cases, these delays can compound to the point that cron job processing appears to be hung. All jobs are executed eventually. When the delays are excessive, the only workaround is to kill and restart cron. Name | Synopsis | Description | Options | Operands | Usage | Examples | Environment Variables | Exit Status | Files | Attributes | See Also | Notes |
|||||||||