Adding a Service Schedule with the CLI
You can create a service schedule for the following objects:
Use the following statements to configure a service schedule:
schedule name {description description;}
- From configuration mode, access the configuration statement that configures the service schedule for the objects for which you can create a service schedule. Enter a unique name for the service schedule.
user@host# edit services scope name schedule nameuser@host# edit services global schedule nameuser@host# edit subscribers retailer name schedule nameuser@host# edit subscribers retailer name subscriber-folder folder-name enterprise name schedule nameuser@host# edit subscribers retailer name subscriber-folder folder-name subscriber name schedule name
- (Optional) Describe the service schedule.
user@host# set description description- Create schedule entries for the service schedule. A number of schedule entries, or rules, constitute each service schedule.
user@host# set event nameAn entry consists of the schedule time, any excluded times, and a list of actions. To create an entry:
See Setting the Time Schedule.
See Setting the Action.
Setting the Time Schedule
When you set up a time schedule, you specify:
- For event schedules—Time at which an action is to occur; the from date and time information
- For schedules for services that have authorization configured—Beginning and end of the interval; the to date and time information
- For exclusions—Times to be excluded from that schedule
Use the guidelines in Guidelines for Entering Time Values.
Use the following statements to configure a time schedule for an event:
schedule name event name from {effective effective;hour hour;minute minute;day-of-month day-of-month;day-of-week day-of-week;month month;year year;time-zone time-zone;}schedule name event name to {effective effective;hour hour;minute minute;day-of-month day-of-month;day-of-week day-of-week;month month;year year;time-zone time-zone;}Use the following statements to configure time exclusions from the schedule:
schedule name event name except name from {hour hour;minute minute;day-of-month day-of-month;day-of-week day-of-week;month month;year year;time-zone time-zone;}schedule name event name except name to {hour hour;minute minute;day-of-month day-of-month;day-of-week day-of-week;month month;year year;time-zone time-zone;}To configure the time schedule:
- From configuration mode, access the configuration statement that configures the service schedule for the objects for which you can create a service schedule. Enter a name for the event and the exclusion. The specified name is not stored as an identifier, so the arbitrary value can be as simple as a number.
- (Optional) Specify the effective period in which to schedule the event. This period is the interval after the associated from or to time during which the scheduled action can be initiated by a subscriber who is logging in to a subscriber session.
user@host# set effective effective- (Optional) Specify the hour of the day in the indicated month in which to schedule the event or exclusion.
user@host# set hour hour- (Optional) Specify the minutes past the indicated hour in which to schedule the event or exclusion.
user@host# set minute minute- (Optional) Specify the day of the month in which to schedule the event or exclusion.
user@host# set day-of-month day-of-month- (Optional) Specify the day of the week in which to schedule the event or exclusion.
user@host# set day-of-week day-of-week- (Optional) Specify the month of the year in which to schedule the event or exclusion.
user@host# set month month- (Optional) Specify the year in which to schedule the event or exclusion.
user@host# set year year- (Optional) Specify the time zone to use in the schedule.
user@host# set time-zone time-zoneGuidelines for Entering Time Values
When you enter time schedules, you can use the values in the following list. See Setting the Time Schedule for a description of the options.
- 0 if used in the
from
orto
statements of a scheduled event- First or last if used in the statements of a schedule exclusion
- Time zones—Local SAE time zone
- All other options—First through last
- For options in the
to
statements, * for the end time is equivalent to "deny service activation after this start date."- For dates in the
from
statements, * is equivalent to "deny service activation before this end date."
- Range of numbers separated by a hyphen. The range is inclusive; for example, 1-5 for the hour specifies hours 1, 2, 3, 4, and 5.
- List of numbers or ranges separated by commas. For example, 1,2,5,9 or 0-4,8-12.
- Skip values in ranges:
- To skip a number's value through the range, follow a range with /<number>. For example, 0-23/2 used in the
hour
option specifies that the event occurs every other hour.- Skip values with *. If you want to specify every two hours, use */2.
NOTE: If you set both a day of the month and a day of the week, the day of the month is used.
Setting the Action
Use the following configuration statements to configure the list of actions for the service schedule:
schedule name event name action name {type (activate | deactivate | deny | deny-deactivate);service service;substitution [substitution...]; }
- From configuration mode, access the configuration statement that configures the service schedule for the objects for which you can create a service schedule. Enter a name for the event and the action. The specified name is not stored as an identifier, so the arbitrary value can be as simple as a number.
- Specify the type of action. The deny and the deny-deactivate values apply only to services that have an authorization plug-in configured. For more information, see Authorizing Scheduled Services with the CLI.
user@host# set type (activate | deactivate | deny | deny-deactivate)- Specify the name of the service.
user@host# set service service- (Optional) Specify substitutions to be used when the service is activated. Substitutions apply only to service activations.
user@host# set substitution [substitution...]For more information, see the activateService method of the SAE external interface in the SAE CORBA remote API documentation in the SRC software distribution in the folder SDK/doc/idl or on the Juniper Networks Web site at
http://www.juniper.net/techpubs/software/management/sdx/api-index.html
For more information about substitutions and schedules, see Example: Configuring Different Service Tiers for Different Days with the CLI.
For information about the syntax for substitutions, see Chapter 14, Defining and Acquiring Values for Parameters.
Defining Attributes for Service Activation
Use the following statement to configure attributes for service activation:
schedule name event name action name attribute (sessionName | sessionTag | sessionTimeout | downStreamBandwidth | upStreamBandwidth) {value;}
- From configuration mode, access the configuration statement that configures the service schedule for the objects for which you can create a service schedule.
- Specify the value for the attribute that is set before the service is activated.
user@host# set attribute (sessionName | sessionTag | sessionTimeout | downStreamBandwidth | upStreamBandwidth) valueSubscription attributes apply only to service activations.
For more information about subscription attributes, see the Subscription.html file in the SAE core portal API documentation in the SDK/doc/sae/net/juniper/smgt/sae/portal directory in the SRC software distribution or on the Juniper Networks Web site at
http://www.juniper.net/techpubs/software/management/sdx/api-index.html