Previous Topic: dtscli -job Parameter Group—Manage Transfer JobsNext Topic: dtscli -log Parameter Group—Specify Logging Level and Mode


dtscli -schedule Parameter Group—Manage Schedules

(Optional) The -schedule parameter group creates, deletes, and invokes other methods for schedule objects.

Syntax format:

dtscli -schedule [id=object_id] [calendar=y|n] ["calendars=calendars"] 
["calendar_check_times=calendar_check_times"] [description=description] [enable=y|n] [label=label] method=method ["method_parameters=method_parameters"] schedule_time=schedule_time ["jobs=transfer_job_object_ids"] [valid_from=valid_from] [valid_to=valid_to] [data1=user_data1] [data2=user_data2]

Note: The -schedule operand can be abbreviated as -s.

id=object_id

(Optional) Applies a transfer method, transfer job method, or schedule method appropriately to one, more, or all specified transfers, transfer jobs, or schedules.

Note: Required for existing schedules only. Do not specify this operand when creating a schedule (method=create).

Default: None

Examples:

calendar=y|n

(Optional) Indicates whether the schedule is based on calendar definitions or a one-time schedule activation. If the value is y, the schedule is based on calendar definitions; therefore, the associated calendar properties must also be set (calendars, valid_from, valid_to, and calendar_check_times). If the value is n, the schedule is based on a one-time activation; therefore, also set the schedule_time parameter.

Default: n

"calendars=calendars"

(Optional) Defines complex scheduling. Associating a calendar with a schedule allows repeated and complex activation times and dates to be specified, including quarterly, monthly, weekly, daily, every first Friday, and so on.

Specify a space-separated list of valid calendar names, and enclose the entire expression in quotation marks.

The calendars parameter must be used with the valid_from and valid_to parameters.

Default: None

"calendar_check_times=calendar_check_times"

(Optional) Indicates the times of day when the calendars associated with the schedule are checked.

This property should contain a space-separated list of times in chronological order in the format HHMMSS, with the entire expression enclosed in quotation marks. A value indicates the times of day after 12:00 AM that the calendars associated with the schedule are checked.

Note: If this property is empty, then the calendars associated with the schedule are not checked.

Default: None

"description=description"

(Optional) Specifies a description for a schedule. If the description includes one or more spaces, enclose the entire expression in quotation marks.

Limits: 1–255 characters

enable=y|n

(Optional) Indicates whether a schedule should be enabled at creation time. Specify enable=y to enable the schedule at creation time. Specify enable=n if you do not want to enable the schedule at creation time.

Once the schedule is created, you can change its state, using the enable and disable schedule methods.

Default: y

label=label

(Optional) Specifies the label for the schedule you are creating. To assign a label, use the label=label operand and supply a non-numeric value, preferably a logical, simple name. You can specify a label only at object creation time; that is, when you enter the dtscli command that creates the object.

Using a label provides an alias, an alternate means besides the object ID for identifying one or more objects. If desired, you can give two or more objects the same label, so that you can apply the same method to all of those objects in a single command, by specifying a single label value instead of multiple object ID values.

A label used in this way is a two-step process:

Default: None

Example:

Note: Specifying the same label and applying the same method to a group of objects applies to transfers, transfer jobs, and schedules.

method=method

Specifies the methods to be applied to a schedule.

Note: When invoking any method other than create, the only valid operands are id= (mandatory), method= (mandatory), and, if the method takes parameters, method_parameters.

add

Adds the specified calendars to the schedule, at the end of the list of calendars in the schedule. This method takes parameters; see method_parameters.

create

Creates a new schedule.

delete

Deletes one or more schedules.

disable

Disables one or more schedules.

enable

Enables one or more schedules.

insert

Adds the specified calendars to the schedule at the position you specify in the list of calendars in the schedule. This method takes parameters; see method_parameters.

remove

Deletes the specified calendars from the schedule. This method takes parameters; see method_parameters.

status

Reports the status of one or more schedules. This method indicates the status of the schedule, not the transfer jobs associated with the schedule. The system response is Initialized, Success, or Failure. This method takes parameters; see method_parameters.

This property is reset to Initialized when a schedule is enabled or disabled.

Default: None

"method_parameters=method_parameters"

(Optional) Specifies the method parameters to be applied to a schedule. Separate the parameters with spaces and enclose the entire method_parameters expression in quotation marks.

add

Specifies a list of transfer job IDs to be added to an existing schedule.

Example: Add transfer jobs 123–126 into schedule 220:

dtscli -s id=220 method=add "method_parameters=123 124 125 126"
remove

Specifies a list of transfer job IDs to be removed from an existing schedule.

Example: Remove transfer jobs 123–126 from schedule 220:

dtscli -s id=220 method=remove "method_parameters=123 124 125 126"
insert

Inserts new transfer jobs in an existing schedule. Used with the position parameter.

Examples:

  • Insert transfer jobs 123–126 into schedule 388, starting at position 1 (in front of all previously existing transfer jobs).
    	dtscli -s id=388 method=insert "method_parameters=1 123 124 125 126" 
    
  • Insert transfer jobs 123–126 into schedule 388, starting at position 0. Position 0 means that these objects are appended to the list after all previously existing transfer jobs.
    	dtscli -s id=388 method=insert "method_parameters=0 123 124 125 126" 
    
position

Specifies the position in an existing schedule where one or more new transfer jobs will be inserted. The position parameter must be the first method_parameter specified; the remaining method_parameters are the object IDs of the transfer jobs to be inserted. The position parameter applies only to the insert method.

status

Reports the status of a schedule. You can use the method=status expression alone to report the status of a schedule. Additionally, to report only a specific status, you can add the method_parameters=I|F|S expression. Valid values are I=Initialized, S=Succeeded, and F=Failed. Use the following format:

dtscli -s id=schedule_id method=status "method_parameters=I|F|S" 

Data Transport Service displays the status of the schedule if it matches the method parameter (status) you specified.

Default: None

schedule_time=schedule_time

Specifies the time and date the schedule is to be activated. The schedule_time parameter is used when a schedule is required to be activated just once. If schedule_time is set, then the calendar parameter should be set to N. If a schedule is required to be activated periodically, the calendars parameter should be used and the calendar parameter should be set to Y.

Default: None

"jobs=transfer_job_object_ids"

(Optional) Identifies the transfer job objects in the schedule object. When the schedule is activated at the time specified by the calendars or schedule_time associated with the schedule, these transfer jobs are activated.

Specify a space-separated list of transfer job object identifiers, and enclose the entire expression in quotation marks, using the following format:

dtscli ... "jobs=132 154 185"

Note: Before you add transfer jobs to a schedule, create the transfer jobs and note their object IDs.

Default: None

valid_from=valid_from

(Optional) Specifies the start of the time period in which the calendar specifications of the schedule object are examined.

The valid_from parameter must be used with the valid_to calendar and calendars parameters. The valid_from parameter should specify a time earlier than the valid_to parameter.

Default: None

valid_to=valid_to

(Optional) Specifies the end of the time period in which the calendar specifications of the schedule object are examined.

The valid_to parameter must be used with the valid_from calendar and calendars parameters. The valid_to parameter should specify a time later than the valid_from parameter.

Default: None

data1=user_data1

(Optional) Allows user-defined data to be associated with the schedule.

Default: None

data2=user_data2

(Optional) Allows user-defined data to be associated with the schedule.

Default: None