Creating scheduled tasks

You can schedule tasks for Copy Services Manager.

About this task

Starting with Copy Services Manager Version 6.2.1, you can use a GUI wizard to schedule tasks. Currently, tasks can only be scheduled against sessions.

The scheduled tasks can consist of one or more actions, including issuing commands, and waiting for states.

The wait for state action ensures that the next action in the list does not occur until the session is in the right state. The list of actions that you create in the wizard occur sequentially, one after the other. So the Wait for State action delays the next action in the task from running until the specified state is reached. The task fails if the state is not reached.

Perform the following steps to schedule a task:

Procedure

  1. Log in to the Copy Services Manager GUI as a user with administrator privileges.
  2. Click Settings > Scheduled Tasks.
  3. Click Create Task. The Scheduled Task wizard is displayed.
    1. Type a name for the scheduled task in the Task Name field.
    2. Optional: You can enter a Description for the scheduled task.
    3. You can also set the option to Create a PE package if error occurs running the task.
      Tip: The information in a PE package can be helpful when troubleshooting.
    4. Click Next.
  4. On the next page of the wizard, select whether you want the task to run Hourly or Daily/Weekly.Start of change You can also select No schedule if you do not want the task to run on a set schedule.End of change Start of change
    Notes:
    • The task does not start running on the schedule until it is enabled.
    • If you select No schedule, you cannot enable the task because it does not have a schedule. You can run the task manually, but you must set a schedule to enable it.
    End of change
    • If you select Hourly, indicate how often (for example, every 3 hours). The task is scheduled to start at the top of the hour at the selected interval.
      Note: The hourly scheduling is set by dividing a 24-hour day into the number of intervals that you want. For example, if wanted to run the task every 3 hours, that would equal eight times per day. In this example, starting at midnight, the day is divided into eight intervals.

      If you require a specific time of the day for the task to start, use the Daily/Weekly schedule.

    • If you select Daily/Weekly, select which day or days of the week, and a Time of day to start.
      Note: The start time is based on the browser, which uses the local system time. The Copy Services Manager server might not be located in the same time zone as the browser. Keep this fact in mind when you select the Time option.
    1. Click Next.
  5. Click Add Action.
  6. On the next page of the wizard, make the following selections:
    1. Choose the action Type from one of the following options:
      Command
      Runs a selected command on the selected session at the selected time interval. You select the command and session in a later step.
      Wait For State
      Waits until the selected session reaches a specified state before the next action is performed. You select the state and session in a later step.
    2. From the table, select the session for which you want to schedule the action. Only sessions for which the selected action can be performed are displayed.
      Note: Currently, you can only schedule an action against one session at a time.

      The following information is provided about each session that you can choose from for scheduling a task:
      Name
      The session name.
      Type
      Indicates the type of session.

      You can customize the session list by filtering information, resizing columns, reordering columns, sorting rows, and hiding columns. All changes that you make to the sorting, column sizing, column order, and table filters persist for each user on a browser across logins.

      • To filter the list by session name or type, enter the filter text in the Filter field. You can enter complete text or partial text. To remove the filtering for the list, click the X icon in the Filter field.
      • To resize a column, drag the column heading border until the column is at the width that you want.
      • To sort the rows in the list, click the heading for the column that contains the value that you want to use for sorting. For example, if you want to sort by the session type, click the Type heading. The list sorts by the value in that column. You can choose an ascending or descending sort order by clicking the column heading.
      • To reorder columns, left click and drag a column from the current location in the table to the new preferred location.
      • To hide columns or make columns visible, right-click on the table header. This action gives you a list of possible columns for the table. Or you can left-click on the icon in the upper right of the table header. Clear the check from any column to hide it from the table. Check any column to make it visible in the table.
    3. For Command and Wait For State actions, you need to make more selections.
      For a Command action:
      • Select the command that you want to issue.
        Note: The commands that are available depend on the type of session that you select.
      For the Wait for State action:
      • Select which state to wait for before the next action is performed.
        Note: The states that are available depend on the type of session that you select.
      • Select a time, in minutes, to wait before the action times out.
      Note: If the command fails, or the state is not reached before the timeout time that you selected, the entire task fails and no other actions run.
    4. Click OK to save your changes for the scheduled task action, or click Cancel to exit without saving changes.
  7. Repeat steps 5 and 6 for every action that you want to perform in the scheduled task.
    Example:

    You might have two sessions: a Global Mirror Failover/Failback (GM) session and a Metro Mirror Failover/Failback (MM) session. In this example, the MM session is running in Global Copy mode and is cascaded off the GM session's Global Copy target volumes to a third site. You might want to periodically schedule a set of actions so that the targets of the MM session that is running in GC mode get a consistent image.

    You can schedule this set of actions as follows:
    1. Create a new task.
    2. Choose a schedule when the task runs (such as daily at midnight).
    3. Add a Command action that issues a Suspend command to the GM session. This action suspends the GM session consistently if the DS8000 supports Pause with Consistency.
    4. Add a Wait for State action that waits until the GM session is in a Suspended state.
    5. Add a Command action that issues a Suspend command to the MM session.
    6. Add a Wait for State action that waits until the MM session is in a Suspended state.
    7. Add a Command action that issues a Start H1->H2 command to the GM session. This command restarts the GM session so that replication is running again to the second site.
  8. You can change the order in which the actions are performed by clicking Up or Down. You can also delete actions by selecting them from the table and clicking Remove Action. Or you can make changes to actions by clicking Modify Action.
  9. On the next page, review the summary for the scheduled task actions. If everything is correct, click Finish. If you need to make changes, click Back to return to any pages in the wizard where changes need to be made.
  10. If you click Finish, a message indicates whether the task was created successfully.

Results

The scheduled task appears in the Scheduled Tasks table.
Note: Tasks are initially in a disabled state. You must use either the Enable command to start them according to the preset schedule, or the Run command to execute them immediately, including in a disabled state. For more information, see Enabling a scheduled task and Running a scheduled task.
The following information is provided about each scheduled task:
Name
The scheduled task name.
Type
Indicates the type of the scheduled task.
Affected Sessions
The sessions that are used for the scheduled task to run.
Status
Indicates whether the task is enabled, disabled, or running.
Schedule
The time and days of week that this task is scheduled to run.
Next Run Time
Shows the date and time of when the scheduled task will run next. When you use an hourly schedule, the scheduling is set by dividing a 24-hour day into the number of intervals that you want. For example, if you wanted to run the task every 3 hours, that would equal eight times per day. In this example, starting at midnight, the day is divided into eight intervals. If you require a specific time of the day for the task to start, use the Daily/Weekly schedule.
Last Run Time
The date and time of when the scheduled task ran the last time.
Last message
Shows the message ID of the status from the last run. To see more details, click the message to open the Help page.

You can filter and customize the scheduled tasks list as previously described for the session table in the scheduled tasks wizard.

Modifying a scheduled task

You can modify scheduled tasks.

About this task

Modifying a scheduled task brings up the schedule task wizard for you to make changes.
Note: You can only modify one task at a time.

Follow these steps to modify a scheduled task:

Procedure

  1. Log in to the Copy Services Manager GUI as a user with administrator privileges.
  2. Click Settings > Scheduled Tasks.
  3. From the table, select the scheduled task that you want to modify.
    Note: You can only select one task at a time to modify.
  4. Click Actions > Modify Task.
  5. Change any of the wizard settings for the scheduled task, as required.
  6. On the final page of the wizard, review the summary for the scheduled task. If everything is correct, click Finish. If you need to make changes, click Back to return to any pages in the wizard where changes need to be made.
  7. If you click Finish, a message indicates whether the task was modified successfully.

Results

The modified scheduled task appears in the Scheduled Tasks table.

Removing a scheduled task

You can remove a scheduled task.

About this task

You can select multiple scheduled tasks to remove.

Follow these steps to remove one or more scheduled tasks:

Procedure

  1. Log in to the Copy Services Manager GUI as a user with administrator privileges.
  2. Click Settings > Scheduled Tasks.
  3. From the table, select the scheduled task or tasks that you want to remove.
  4. Click Actions > Remove Task.
  5. A warning message is displayed for confirmation. Click Yes to remove the selected task or tasks. Click No to exit without removing the selected task or tasks.
  6. If you click Yes, a message appears indicating that the selected task or tasks have been removed.

Results

Any scheduled task that you chose to remove no longer appears in the Scheduled Tasks table.

Enabling a scheduled task

You can enable a scheduled task to run according to the preset schedule.

About this task

You can select multiple scheduled tasks to enable.

When a task is initially created, it is put into a disabled state. The Enable command starts the task so that the timer begins running. The task executes based on the schedule that you set for it.

Follow these steps to enable one or more scheduled tasks:

Procedure

  1. Log in to the Copy Services Manager GUI as a user with administrator privileges.
  2. Click Settings > Scheduled Tasks.
  3. From the table, select the scheduled task or tasks that you want to enable.
  4. Click Actions > Enable Task.
  5. A warning message is displayed for confirmation. Click Yes to enable the task. Click No to exit without enabling the task.
  6. If you click Yes, a message appears indicating that the selected task or tasks were enabled.

Results

The scheduled task or tasks are enabled, and start running according to the preset timer.

Disabling a scheduled task

You can disable a scheduled task that has been started with the Enable command.

About this task

You can select multiple scheduled tasks to disable.

When a task is initially created, it is put into a disabled state. The Enable command starts the task so that the timer begins running. The task executes based on the schedule that you set for it. The Disable command can be used to stop an enabled, scheduled task.

Follow these steps to disable one or more enabled, scheduled tasks:

Procedure

  1. Log in to the Copy Services Manager GUI as a user with administrator privileges.
  2. Click Settings > Scheduled Tasks.
  3. From the table, select the enabled, scheduled task or tasks that you want to disable.
  4. Click Actions > Disable Task.
  5. A warning message is displayed for confirmation. Click Yes to disable the task. Click No to exit without disabling the task.
  6. If you click Yes, a message appears indicating that the selected task or tasks were disabled.

Results

The scheduled task or tasks are disabled, and stop running.

Running a scheduled task

You can run a scheduled task.

About this task

You can select multiple scheduled tasks to run.

The Run command is different from the Enable command. It forces the task to run immediately without regard to the schedule. The task can also be run from a disabled state.

Follow these steps to run one or more scheduled tasks:

Procedure

  1. Log in to the Copy Services Manager GUI as a user with administrator privileges.
  2. Click Settings > Scheduled Tasks.
  3. From the table, select the scheduled task or tasks that you want to run.
  4. Click Actions > Run Task.
  5. A warning message is displayed for confirmation. Click Yes to run the task. Click No to exit without running the task.
  6. If you click Yes, a message appears indicating that the selected task or tasks will start running.

Results

The scheduled task or tasks start running immediately.