EXIT /B
:ABEND
REM ####################################### ABEND
ECHO "Download Report Script was ABEND"
:END
REM ####################################### Logout
%RAIDINF_PATH%\raidinf -logout -servername %SERVER%
Executing a script file regularly
For executing the created script file regularly, register it as a task of Windows.
The following procedure uses the Windows schtasks command to register the script files created
at “Preparing a script file” (page 68) 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:\>schtasks /Query
Task name Time of next execution Status
================== ======================== ===============
CreateReport 21:00:00, 2011/05/17
DownloadReport 22:00:00, 2011/05/17
Execution example and explanation of script files
If the script file for creating a configuration report and the script file for downloading a configuration
file are executed for the first time, the Report_DailyConfigurationReport_1.tgz file is
created in the C:\Reports folder.
C:\Reports
CreateReport.bat
DownloadReport.bat
Report_DailyConfigurationReport_1.tgz
On the second day, Report_DailyConfigurationReport_1.tgz is renamed
Report_DailyConfigurationReport_2.tgz, and
Report_DailyConfigurationReport_1.tgz is newly created.
From the third day on, Report_DailyConfigurationReport_1.tgz and
Report_DailyConfigurationReport_2.tgz are renamed
Creating a configuration report using the Report Configuration Tool 71
Komentarze do niniejszej Instrukcji