Administration Guide
You can start the Script Center by selecting the icon from the Control
Center Toolbar. The Script Center is a tool that allows you to create
scripts by writing a set of commands and statements, which you can schedule to
run whenever you require. You can import scripts that you created
earlier or scripts that you saved in the Command Center. You can select
scripts from the set of scripts saved and you can edit existing scripts to
create new scripts, copy scripts, or remove scripts.
You can edit a script inside the Script Center or outside the Script Center
using your own editor. If you run a script from within the Script
Center, you get the added advantage of having the results logged in the
Journal.
To run operating system commands from a script in the Script Center:
- Select Script --> New. The New Command Script
window opens.
- For Script Type, select the OS command radio
button.
- Enter the script name, description, and working directory.
- Enter the commands.
- Click on OK.
From the Script Center, you can view information, such as the description
and script type about all command scripts that are known to the system, and
you can perform the following tasks:
- Create a command script that contains DB2 and operating system commands
- Run a saved command script immediately
- Schedule a script to run at a later date or at a regular interval;
for example, you might want to create a script that collects statistics for
several tables. You could then schedule the job to run
overnight. You can schedule jobs by running them unattended at
scheduled intervals by specifying the hours, days, weeks, months, multiple
times a week, or multiple times a month you want to run the job. A job
is created whenever you schedule a script or run a script immediately.
- Access the Journal from the toolbar to see the jobs that use a particular
script and to see the status of all scheduled jobs
- Edit a saved command script
To use the Script Center with pre-existing scripts which you did not create
from the Script Center:
- From the Control Center toolbar, click on the Script
Center icon. The Script Center opens.
- Select Script --> Import. The File Browser
window opens.
- Select an existing script file and click on OK. The New
Command Script window opens. The script is displayed in the lower part
of the window which is a script editor. Complete the
Instance, Script name, Script description and
Working directory fields, and select a Script
type.
- Click on OK. The script will be created in the Script
Center.
To schedule a script:
- Click the Script Center icon on the Control Center
toolbar. The Script Center opens.
- Click with the right mouse button on the script you want to schedule to
run and select Schedule from the pop-up menu. The Scheduler
window opens.
- Select the frequency for the job, and a completion action, such as a
completion message or another command script to be launched.
- Click OK. This starts a pending job that you can track
in the Journal.
[ Top of Page | Previous Page | Next Page ]