18.2 Using Workstation Scheduler

This section contains the following topics:

18.2.1 Adding an Action

Setting up an action item requires that you add the action item to the list of action items. The network administrator (or other user with the Supervisor right) can do this in ConsoleOne® and then push the action item to one or more user workstations. Users can also set up action items to run on their individual workstations by using the workstation Scheduler.

  1. Load the Scheduler (run wmsched.exe).

  2. Click Add to display the Action Properties dialog box.

  3. On the General page, fill in the fields:

    Name: The name of the action. In ConsoleOne, the name includes the action object’s full context. In the workstation Scheduler, the name is whatever you enter in this field.

    Priority: The order in which the action is run. Higher priority actions run first. If two actions have the same priority, the first one encountered in the action list (contained in the window that is first displayed when the Scheduler is loaded) runs first. The priority selected applies to all action items contained in this action, unless the action item overrides it.

    Impersonation: The workstation access rights to grant to all action items contained by this action. (Windows NT/2000/XP only.)

    Action Remains Persistent after Reboot: The action is saved to the workstation, allowing the Scheduler to reactivate the action at the appointed time when the workstation is rebooted. If this option is not selected, the action is lost when you exit Windows NT/2000/XP.

  4. On the Actions page, click Add.

  5. In the Item Properties dialog box, fill in the fields:

    Name: Specify the name of the program to run. This program must exist on the user’s path to be run as an action item.

    Working Directory: The working directory is automatically set when you specify an action item. It is set to the directory that the action item is in. You can specify a different working directory by entering the path in this field.

    Parameters: The information the system can use for command line arguments to be sent to the application. For example, if you want to launch notepad.exe and have it automatically open the readme.txt file, put readme.txt in the Parameters field.

    Priority: Both actions and action items have four priorities available: Action Default, Above Normal, Normal, and Below Normal. Action items can assume the same priority as the Action object that contains them; in other words, they take on the action’s default priority. Alternatively, they can override the default by using one of the three other priority settings.

    If the action occurs during normal business hours, it should be assigned a Below Normal priority so it does not affect the user's workstation performance.

    If two or more actions or action items have the same priority, the first one defined (the one that appears first in the list) has precedence over the others.

  6. Select the Terminate action if still running after ? minutes check box, then select the desired number of minutes.

    This option terminates the action if it is still running after the number of minutes you specify. The action is then rescheduled to run at the next scheduled time.

    The number of minutes you specify in the Minutes field should be the total time required by the action itself as well as by all action items associated with the action, where applicable. If you do not specify sufficient time for the action and all associated action items to run, your action items might not have enough time to complete their tasks.

  7. Click OK twice.

    The action is added to the Action list on the Scheduler. You can now do any of the following:

    • Specify when this action should take place (Schedule page).

    • Add items to this action (Items page).

    • Specify what happens if this action cannot occur (Advanced page).

18.2.2 Adding an Action Item

This process assumes that you have previously created an action to contain the action items. If you have not yet created an action, see Adding an Action.

  1. In the Scheduler, select an action, click Properties, click Items, then click Add.

  2. In the Item Properties dialog box, fill in the fields:

    Name: Browse to or enter the name of the program to run. This program must exist on the user's path to run as an action item.

    Working Directory: The working directory is automatically set when you browse for an action item. It is set to the directory that the action item is in. You can specify a different working directory by providing the path in this field.

    The Working Directory field must specify a local device. Network paths cannot be used as working directories.

    Parameters: The information the system can use for command line arguments to be sent to the application. For example, if you want to launch notepad.exe and have it automatically open the readme.txt file, put readme.txt in the Parameters field.

    If you are adding an action item that is a DOS batch file, a DOS window must be opened to run it. The DOS window closes when the batch file has finished running if you include the /c parameter. You must add the /c parameter, followed by a space, in front of the name of the batch file in the Parameters field.

    For example, to run a DOS batch file called test_c.bat, make the following entries in the Item Properties dialog box for the action item when you add the action item:

    • Name: CMD.exe (the name of the Windows NT/2000/XP command that opens a DOS window) or START (the name of the Windows 98 command that opens a DOS window).

    • Working Directory: Leave this field blank unless you need to specify where either cmd.exe or start is located.

    • Parameters: /c test_c.bat. You must include the full filename with its extension, and you must use the /c parameter if you want the DOS window to close as soon as the batch file has finished running.

    • Priority: Leave at Action Default, or choose one of the other settings.

    Priority: Both actions and action items have four priorities available: Action Default, Above Normal, Normal, and Below Normal. Action items can assume the same priority as the Action object that contains them; in other words, they take on the action’s default priority. Alternatively, they can override the default by using one of the three other priority settings.

    If the action occurs during normal business hours, it should be assigned a Below Normal priority so it does not affect the user's workstation performance.

    If two or more actions or action items have the same priority, the first one defined (the one that appears first in the list) has precedence over the others.

  3. Select the terminate action if still running after ? minutes check box, then select the desired number of minutes.

    This option terminates the action if it is still running after the number of minutes you specify. The action is then rescheduled to run at the next scheduled time.

    The number of minutes you specify in the Minutes field should be the total time required by the action itself as well as by all action items associated with the action, where applicable. If you do not specify sufficient time for the action and all associated action items to run, your action items might not have enough time to complete their tasks.

  4. To save the settings and continue editing the action, click Apply.

    or

    When you are done with the action item’s properties, click OK.

    The action item now appears in the Action item list.

    If any action items are scheduled to run now and you click OK or Apply, they run.

  5. Repeat Step 2 through Step 4 until you have finished adding items.

18.2.3 Disabling or Enabling an Action

  1. Load the Scheduler (run wmsched.exe).

  2. Click an action.

  3. Click Enable/Disable.

18.2.4 Disabling or Enabling an Action Item

  1. Load the Scheduler (run wmsched.exe).

  2. Click an action, then click Properties.

  3. Click the Items page, select an action item, then click Disable/Enable.

18.2.5 Removing an Action

This procedure cannot be undone. When you click Remove, you are not prompted to verify the removal of the action. If you remove an action that you need later, you must add it again.

  1. Click an action.

  2. Click Remove.

18.2.6 Removing an Action Item

This procedure cannot be undone. When you click Remove, you are not prompted to verify the removal of the action item. If you remove an action item that you need later, you must add it again.

  1. Click an action, then click Properties.

  2. Click Items, select an action item, then click Remove.

18.2.7 Running an Action Immediately

  1. Click an Action.

  2. Click Run Now.

18.2.8 Scheduling an Action to Run

Use the fields on the Schedule page to specify when the action should run and to provide details that the system needs about when the action runs.

The Schedule page contains five scheduling options: Event, Daily, Weekly, Monthly, and Yearly. The option you choose and the settings you associate with it determine when the action is run.

You can use only one scheduling option at a time. For example, if the Daily option is selected, all other options are ignored unless you use the options found on the Advanced tab.

Time units are shown according to a 24-hour clock (for example, 9:00 for 9 a.m. and 13:30 for 1:30 p.m.).

The Scheduler ignores the scheduling information until the action can be started successfully.

To schedule an item:

  1. Select the action you want to schedule.

  2. Click Properties > Schedule.

  3. Select the desired scheduling option:

    • Event: Event scheduling allows you to determine what kind of workstation event causes your action to run. To schedule the action based on an event, click Event and choose from the following list of recognized events:

      Scheduler Service Startup: Runs the action when the Scheduler starts up. You cannot choose the Scheduler Service Startup event to start the action if you are going to run the action with the rights of an interactive user. When these events take place, the interactive user is not yet authenticated. Scheduler Service Startup requires System rights.

      User Login: Runs the action after the user has successfully logged in but before the login scripts are executed.

      User Desktop Is Active: Runs the action after the login scripts have completed (does not apply to Windows 98).

      Workstation Is Locked: Runs the action when the workstation is locked (does not apply to Windows 98).

      Workstation Is Unlocked: Runs the action when the workstation is unlocked (does not apply to Windows 98).

      Screen Saver Is Activated: Runs the action when the screen saver is activated.

      User Logout: Runs the action before logout is completed.

      System Shutdown: Runs the action after all other applications have successfully closed, but before the system shuts down. You cannot choose the System Shutdown event to start the action if you are going to run the action with the rights of an interactive user. When these events take place, the interactive user is no longer authenticated. System Shutdown requires System rights.

    • Daily: Lets you schedule an action to occur on one or more days between the specified start and end times. Optionally, it allows you to repeat the action at regular intervals after the action successfully starts. For example, on Monday, Wednesday, and Friday, you could start the action between 12:30 and 13:00 and run it every 10 minutes. To schedule the action based on a daily basis, click Daily and choose from the following options:

      Run this Action on the Following Days: Specify the days of the week when the action is to run.

      Start the Action Between the Hours of ? (HH:MM): Specify a range of time within which this action can be started.

      Repeat the Action Every ? (HH:MM:SS): Specify the length of time the system is to wait before it repeats this action.

    • Weekly: Lets you schedule an action on a particular day of the week. To schedule an action on a weekly basis, click Weekly and choose from the following options:

      Run this Action Once a Week On: Identifies day of the week when you want the action to run.

      Start this Action Between the Hours of ? (HH:MM): Identifies the exact hour (HH) and minute (MM) to start this action.

    • Monthly: Lets you choose the day of the month when this action runs, as well as the time to start this action. For example, you can choose to run this action on every fourth day of the month, between the hours of 8:00 and 10:15. You specify the time range using a 24-hour clock. If you prefer, you can choose to have the action run on the last day of the month, regardless of how many days there are in the month. To schedule the action on a monthly basis, click Monthly and choose from the following options:

      Run this Action Once a Month on Day __ of the Month: Specify the day of the month on which the system is to automatically run this action. Click one of the available option buttons:

      • On Day _ of the Month: This action runs on the specified day.

      • On the Last Day of the Month: This action runs on the last day of the month regardless of how many days there are in the month.

      Start this Action Between the Hours of ? (HH:MM): Specify the exact hour (HH) and minute (MM) this action is to start.

    • Yearly: Lets you determine the time and the day of the month to perform the action. To schedule the action on a yearly basis, click Yearly and choose from the following options:

      Run the Action Once a Year on Day ? of ?: Specify the day of the month and the month of the year for the action to run.

      Start the Action between the Hours of ? and ?: Using a 24-hour clock, specify the hour and minute of the earliest time this action is to be started, and then the hour and minute of the latest time this action is to be started. For example, choose 17:30 to begin the action no earlier than 5:30 p.m. and 20:00 to begin the action no later than 8:00 p.m.

  4. Click OK.

The schedule you define applies to every action item contained in the action and overrides the package schedule.

18.2.9 Setting Advanced Action Properties

Use the fields on the Advanced page to determine what happens to the action’s schedule if it did not complete or run within the given time, or when it successfully completes.

  1. Click an action > Properties > Advanced.

  2. Specify what should happen if the system cannot run the action:

    • Disable the Action: Disables the action so it does not run again (unless you enable it again).

    • Retry Every Minute: Causes the system to keep trying to run this action every 60 seconds.

    • Ignore the Error and Reschedule Normally: Causes any error that occurred while the action was running to be ignored and the action to be rescheduled for a later date/time.

  3. Select the Disable the action after completion check box to disable the rescheduling mechanism for this action after all action items have started successfully.

  4. Select the Terminate action if still running after ? minutes check box, then select the number of minutes.

    This feature terminates the action if it is still running after the number of minutes you specify. The action is then rescheduled to run at the next scheduled time.

    To set a time limit on how long the action should run, select the check box. The number of minutes that you specify in the Minutes field should be the total time required by the action itself as well as by all action items associated with the action, where applicable. If you do not specify sufficient time for the action and all associated action items to run, your action items might not have enough time to complete their tasks.

    This feature prevents an action that has stopped responding or running without completing from continuously tying up the system. However, selecting this option only affects actions that are not currently running. You cannot use this check box to terminate an action that has already been loaded by the Scheduler and is currently running. Also, if the action you are running (such as a DOS batch file) opened a DOS window, the DOS window is not automatically closed after the action has completed, unless you added the /c parameter in the Parameters field when you originally added the action item.

18.2.10 Viewing or Editing the Details or Properties of an Action

  1. Click an action, then click Properties.

  2. Click one of the pages containing the details or properties associated with this action.

  3. Make the necessary changes.

  4. Click OK.

18.2.11 Viewing or Editing the Details or Properties of an Action Item

  1. Click an action, then click Properties.

  2. Click Item, select an action item, then click Properties.

  3. Make the necessary changes.

  4. Click OK.

18.2.12 Viewing or Editing User-Defined Action Item Properties

  1. Open the Scheduler on a workstation.

  2. Select an action item > click Properties.

  3. Make the necessary changes.

  4. Click OK.

18.2.13 Refreshing the Scheduler

If you are unable to view the contents of the scheduler, click Refresh.