Executing a regularly scheduled script file, Execution example and explanation of script files – HP XP P9500 Storage User Manual

Page 84

Advertising
background image

REM ####################################### Logout
%RAIDINF_PATH%\raidinf -logout -servername %SERVER%

Executing a regularly scheduled script file

To execute the created script file on a regular basis, register it as a scheduled task in Windows.

The following procedure uses the Windows schtasks command to register the script files created
in the example shown in

Preparing a script file (page 80)

as tasks of Windows.

Registration example

Create a configuration report at 21:00 every day (CreateReport.bat).

Download a configuration report at 22:00 every day (DownloadReport.bat).

Operation procedure:

1.

Store the two script files in the C:\Reports folder.

C:\Reports
CreateReport.bat
DownloadReport.bat

2.

Run the Windows schtasks command to register the two script files as a task of Windows.

Make sure that the <Username for Windows> parameter of this command is a user who
has write permissions to the following two folders.

C:\Reports

folder

The log folder in the installation folder of the Report Configuration Tool.

schtasks /create /tn CreateReport /tr

"C:\Reports\CreateReport.bat" /sc DAILY /st. 21:00:00 /ru

<Username for Windows> /rp <Password for Windows> schtasks /create

/tn DownloadReport /tr "C:\Reports\DownloadReport.bat" /sc DAILY

/st 22:00:00 /ru <Username for Windows> /rp <Password for Windows>

3.

Run the schtaks /Query command to confirm that the Windows task is registered.

C:\Reports
CreateReport.bat
DownloadReport.bat
Report_DailyConfigurationReport_1.tgz <-Generated today
Report_DailyConfigurationReport_2.tgz <-Generated yesterday
Report_DailyConfigurationReport_3.tgz <-Generated two days ago

Execution example and explanation of script files

The first time you execute the script files to create a configuration report and download a
configuration file, the:

Report_DailyConfigurationReport_1.tgz

file is created in the C:\Reports folder.

C:\Reports
CreateReport.bat

84

Viewing and managing the storage system

Advertising
This manual is related to the following products: