我们能否在过去20天内获得自动作业的状态。给出那个特定日期的-r
命令。整整20天。
答案 0 :(得分:1)
我想 - 我可以给你你想要的东西。尝试执行以下操作:
autorep –j <your job name> -r -19
答案 1 :(得分:0)
我给你 AUTOHIST.cmd 慢一点,但是可以从命令行使用。
@echo off
SET JOB_NAME=%~1
IF [%JOB_NAME%]==[] GOTO Usage
SET NUM_ENTRIES=%~2
IF [%NUM_ENTRIES%]==[] SET NUM_ENTRIES=10
SET /A NUM_ENTRIES=%NUM_ENTRIES%-1
SET HIST_START=%~3
IF [%HIST_START%]==[] SET HIST_START=0
SET SKIP_HEADER=0
FOR /L %%R IN (%HIST_START%, 1, %NUM_ENTRIES%) DO (
CALL :HistoricalAutoRep %%R
)
GOTO :EOF
:HistoricalAutoRep
IF [%SKIP_HEADER%]==[0] (
SET OPTIONS="delims="
) ELSE (
SET OPTIONS="skip=3 delims="
)
FOR /F %OPTIONS% %%F IN ('CALL AUTOREP -J %JOB_NAME% -r -%1') DO ECHO %%F
SET SKIP_HEADER=1
GOTO :EOF
:Usage
ECHO AUTOHIST ^<Required job name^> [Optional number of historic runs to return] [Optional number of runs back to start querying history]
GOTO :EOF