Skip Headers
Oracle GlassFish Server Reference Manual
Release 3.1.2

Part Number E24938-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

create-schedule

creates a new schedule

Synopsis

create-schedule [--help]
[--hour hour] [--minute minute [--second second]
[--dayofmonth day-of-month]
[--dayofweek day-of-week]
[--month month]
[--year year]
schedule-name

Description

The create-schedule subcommand creates a schedule representing a specific date and time or a recurring interval.

This subcommand is supported in remote mode only.

Options

--help
-?

Displays the help text for the subcommand.

--hour
--minute
--second

Together these options specify a time using a 24-hour clock. These options accept the following types of values:

  • A number. For hours, the numbers 0 through 23 are valid; for minutes and seconds, the numbers 0 through 59 are valid.

  • A dash-separated number range; for example: 0-11.

  • A comma-separated list of numbers, number ranges or mixture of the two; for example: 0-3,8-11,23.

  • A repeating increment in the form start/interval. For example, the increment 0/5 indicates values starting at 0 (zero) and continuing every five thereafter (5, 10, 15 and so on) up to a maximum of 23 for hours or 59 for minutes or seconds.

  • An asterisk (*) to indicate all hours, minutes or seconds.

The default value is 0 (zero) for all of these options, indicating the time 00:00:00 (midnight).

--dayofmonth

Specifies the day or days based on days in a month. This option accepts the following types of values:

  • A positive number 1 through 31, representing the days of the month.

  • A negative number -7 through -1, representing days back from the end of the month. -1 represents the day before the last day of the month, and -7 represents the seventh day before the last day of the month.

  • The value Last, representing the last day of the month.

  • A dash-separated number range (including Last as a number); for example: 8-14 or "-6-Last".

  • An ordinal day in the form ordinal day, where ordinal is one of 1st, 2nd, 3rd, 4th, 5th or Last and day is one of Sun, Mon, Tue, Wed, Thu, Fri or Sat. Note that a space is required between the ordinal and the day. Consequently, the value must be enclosed in quotes ("); for example: "2nd Mon".

  • A comma-separated list of numbers, the value last, number ranges, ordinal days, or mixture of the four; for example: 1,8,15,22,Last or "1st Mon,3rd Mon".

  • An asterisk (*) to indicate all days.

A value that contains spaces or begins with a negative number must be enclosed in quotes (").

The default value is * (asterisk).

Note:

The dayofmonth and dayofweek options are combined to specify scheduled days as follows:

  • Both options set to * (asterisk) — Neither option restricts days, so every day is a scheduled day.

  • One option set to * (asterisk) — The option set to * does not restrict days. Scheduled days are specified by the other option.

  • Neither option set to * (asterisk) — Both options restrict days. Scheduled days are those that match either option.

--dayofweek

Specifies the day or days based on days in a week. This option accepts the following types of values:

  • A number 0 through 7, representing the days of the week beginning with Sunday. The number zero and seven both represent Sunday.

  • A day abbreviation; one of: Sun, Mon, Tue, Wed, Thu, Fri or Sat.

  • A dash-separated number range or day-abbreviation range; for example: 1-5 or Mon-Fri.

  • A comma-separated list of numbers, day abbreviations, ranges, or mixture of the three; for example: Sun,Thu-Fri.

  • An asterisk (*) to indicate all days.

The default value is * (asterisk).

Note:

The dayofmonth and dayofweek options are combined to specify scheduled days as follows:

  • Both options set to * (asterisk) — Neither option restricts days, so every day is a scheduled day.

  • One option set to * (asterisk) — The option set to * does not restrict days. Scheduled days are specified by the other option.

  • Neither option set to * (asterisk) — Both options restrict days. Scheduled days are those that match either option.

--month

Specifies the month or months. This option accepts the following types of values:

  • A number 1 through 12, representing the months of the year beginning with January.

  • A month abbreviation; one of: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov or Dec.

  • A dash-separated number range or month-abbreviation range; for example: 1-3 or Jan-Mar.

  • A comma-separated list of numbers, month abbreviations, ranges, or mixture of the three; for example: 1,4,7,10 or Jan,Apr,Jul,Oct.

  • An asterisk (*) to indicate all months.

The default value is * (asterisk).

--year

Specifies the year or years. This option accepts the following types of values:

  • A four-digit number, representing a single year.

  • A dash-separated range of four-digit numbers, representing a range of years; for example: 2011-2014.

  • A comma-separated list of four-digit numbers, ranges, or mixture of the two; for example: 2011,2013,2015.

  • An asterisk (*) to indicate all years.

The default value is * (asterisk).

Operands

schedule-name

Specifies the name of the schedule to create.

Examples

Example 1   Creating a Quarterly Schedule

This example creates the schedule quarterly, which specifies the first day of every quarter-year at midnight:

asadmin> create-schedule --month Jan,Apr,Jul,Oct --dayofmonth 1 quarterly
Command create-schedule executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

See Also

delete-schedule(1), list-schedules(1)

asadmin(1M)