Page tree

This task describes how to schedule a script for execution via BMC PATROL PSL. You can schedule an existing script for execution, or schedule a script that does not yet exist for execution.

Before you begin

Ensure that the following requirements are met:

  • The BMC PATROL Agent must have read and execute permissions for the script that is being scheduled for execution.
  • The BMC PATROL Agent must have write permissions for all output files, if you are creating a script with output files.

Warning

If you schedule a script with incorrect information (for example, a non-existent script, or one that resides in a directory that is different from the one you specified) for execution, BMC PATROL will attempt to execute it at the scheduled time. However, the execution will fail, and the script will not run.

To Schedule a PSL Script for Execution

  1. Access the SCHEDULER application menu as described in Accessing KM Commands and InfoBoxes.
  2. Select Schedule Tasks from the pop-up menu. The Schedule Tasks dialog box is displayed.
  3. In the Actions group box, select Schedule New Task and click Accept. The Schedule New Task dialog box is displayed.
  4. Select the Schedule a PATROL PSL Script option and click Accept.
  5. In the Execute Script at group box, use the spinner buttons or type a value in the following fields to schedule the script:

    Field

    Description

    Month

    Indicate the month in which the script should execute

    Day

    Indicate the date on which the script should execute

    Year

    Indicate the year in which the script should execute

    hh

    indicate at which hour of the day the script should execute Enter hours in military time. For example, if you want to schedule a script to execute at 4 P.M., enter 16 in this field.

    mm

    Indicate at which minute the script should execute

    ss

    Indicate at which second the script should execute

  6. If you want to set the script to occur at regularly scheduled intervals, use the spinner buttons or type values in the following fields of the Repeat Execution group box:

    Field

    Description

    Days

    Indicate the number of days that should pass between script executions

    hh

    Indicate the number of hours that should pass between script executions

    mm

    Indicate the number of minutes that should pass between script executions

    ss

    Indicate the number of seconds that should pass between script executions

  7. Select the Execute Once Immediately option if you want the script to execute now.

    Note

    If you do not select this option and you are scheduling a script that was supposed to run in the past, it will not run again until the repeated execution runtime. For example, if you have a backup script that is supposed to run every Sunday evening, but you fill out this dialog box on a Monday morning, BMC PATROL will not run the script until the next scheduled execution. You must toggle the Execute Once Immediately button on to run the script now.

  8. In the Internal PSL Process Name field, type the name of the PSL process that will be run with the script. For more information about PSL process names, look up the PslEexecute() function in the PATROL Script Language Reference Manual Volume 2--PSL Functions.
  9. In the Script File Name field, type the full path and file name for the script.

    Note

    If you enter an incorrect file name and path, the BMC PATROL Scheduler File Name dialog box will display when you click Accept. This dialog box prompts you to correct the file name and path, or schedule the task as-is. If you schedule a script with incorrect information (for example, a non-existent script, or one that resides in a directory that is different from the one you specified) for execution, BMC PATROL will attempt to execute it at the scheduled time. However, the execution will fail, and the script will not run.

  10. In the Write Compile Errors To field, type the full path and file name for the error output file. This field is optional.

    Note

    If you specify an error output file name in this field, the BMC PATROL Agent must have write permissions for the output file.

  11. In the Write Compile Warnings To field, type the full path and file name for the warning output file. This field is optional.

    Note

    If you specify a warning output file name in this field, the BMC PATROL Agent must have write permissions for the output file.

  12. Click Accept. The dialog box closes, and BMC PATROL schedules the script for execution.
  • No labels