Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   at.1p    ( 1 )

выполнять команды позже (execute commands at a later time)

Операнды (Operands)

The following operands shall be supported:

at_job_id The name reported by a previous invocation of the at utility at the time the job was scheduled.

timespec Submit the job to be run at the date and time specified. All of the timespec operands are interpreted as if they were separated by <space> characters and concatenated, and shall be parsed as described in the grammar at the end of this section. The date and time shall be interpreted as being in the timezone of the user (as determined by the TZ variable), unless a timezone name appears as part of time, below.

In the POSIX locale, the following describes the three parts of the time specification string. All of the values from the LC_TIME categories in the POSIX locale shall be recognized in a case-insensitive manner.

time The time can be specified as one, two, or four digits. One-digit and two-digit numbers shall be taken to be hours; four-digit numbers to be hours and minutes. The time can alternatively be specified as two numbers separated by a <colon>, meaning hour:minute. An AM/PM indication (one of the values from the am_pm keywords in the LC_TIME locale category) can follow the time; otherwise, a 24-hour clock time shall be understood. A timezone name can also follow to further qualify the time. The acceptable timezone names are implementation-defined, except that they shall be case-insensitive and the string utc is supported to indicate the time is in Coordinated Universal Time. In the POSIX locale, the time field can also be one of the following tokens:

midnight Indicates the time 12:00 am (00:00).

noon Indicates the time 12:00 pm.

now Indicates the current day and time. Invoking at <now> shall submit an at-job for potentially immediate execution (that is, subject only to unspecified scheduling delays).

date An optional date can be specified as either a month name (one of the values from the mon or abmon keywords in the LC_TIME locale category) followed by a day number (and possibly year number preceded by a comma), or a day of the week (one of the values from the day or abday keywords in the LC_TIME locale category). In the POSIX locale, two special days shall be recognized:

today Indicates the current day.

tomorrow Indicates the day following the current day.

If no date is given, today shall be assumed if the given time is greater than the current time, and tomorrow shall be assumed if it is less. If the given month is less than the current month (and no year is given), next year shall be assumed.

increment The optional increment shall be a number preceded by a <plus-sign> ('+') and suffixed by one of the following: minutes, hours, days, weeks, months, or years. (The singular forms shall also be accepted.) The keyword next shall be equivalent to an increment number of +1. For example, the following are equivalent commands:

at 2pm + 1 week at 2pm next week

The following grammar describes the precise format of timespec in the POSIX locale. The general conventions for this style of grammar are described in Section 1.3, Grammar Conventions. This formal syntax shall take precedence over the preceding text syntax description. The longest possible token or delimiter shall be recognized at a given point. When used in a timespec, white space shall also delimit tokens.

%token hr24clock_hr_min %token hr24clock_hour /* An hr24clock_hr_min is a one, two, or four-digit number. A one-digit or two-digit number constitutes an hr24clock_hour. An hr24clock_hour may be any of the single digits [0,9], or may be double digits, ranging from [00,23]. If an hr24clock_hr_min is a four-digit number, the first two digits shall be a valid hr24clock_hour, while the last two represent the number of minutes, from [00,59]. */

%token wallclock_hr_min %token wallclock_hour /* A wallclock_hr_min is a one, two-digit, or four-digit number. A one-digit or two-digit number constitutes a wallclock_hour. A wallclock_hour may be any of the single digits [1,9], or may be double digits, ranging from [01,12]. If a wallclock_hr_min is a four-digit number, the first two digits shall be a valid wallclock_hour, while the last two represent the number of minutes, from [00,59]. */

%token minute /* A minute is a one or two-digit number whose value can be [0,9] or [00,59]. */

%token day_number /* A day_number is a number in the range appropriate for the particular month and year specified by month_name and year_number, respectively. If no year_number is given, the current year is assumed if the given date and time are later this year. If no year_number is given and the date and time have already occurred this year and the month is not the current month, next year is the assumed year. */

%token year_number /* A year_number is a four-digit number representing the year A.D., in which the at_job is to be run. */

%token inc_number /* The inc_number is the number of times the succeeding increment period is to be added to the specified date and time. */

%token timezone_name /* The name of an optional timezone suffix to the time field, in an implementation-defined format. */

%token month_name /* One of the values from the mon or abmon keywords in the LC_TIME locale category. */

%token day_of_week /* One of the values from the day or abday keywords in the LC_TIME locale category. */

%token am_pm /* One of the values from the am_pm keyword in the LC_TIME locale category. */

%start timespec %% timespec : time | time date | time increment | time date increment | nowspec ;

nowspec : "now" | "now" increment ;

time : hr24clock_hr_min | hr24clock_hr_min timezone_name | hr24clock_hour ":" minute | hr24clock_hour ":" minute timezone_name | wallclock_hr_min am_pm | wallclock_hr_min am_pm timezone_name | wallclock_hour ":" minute am_pm | wallclock_hour ":" minute am_pm timezone_name | "noon" | "midnight" ;

date : month_name day_number | month_name day_number "," year_number | day_of_week | "today" | "tomorrow" ;

increment : "+" inc_number inc_period | "next" inc_period ;

inc_period : "minute" | "minutes" | "hour" | "hours" | "day" | "days" | "week" | "weeks" | "month" | "months" | "year" | "years" ;