Run a maintenance plan: Example batch file
In this example batch file, which runs a maintenance plan called "db", a message reflecting the return code of the maintenance plan is displayed on the command line.
if not defined errorlevel goto end
"C:\Program Files\ReadSoft\INVOICES\Bin\eimngr.exe" /m db
if errorlevel 2 goto answer2
if errorlevel 1 goto answer1
echo Maintenance plan executed without errors.
echo Maintenance plan executed with minor errors. Please check the log file for details.
echo Maintenance plan could not be executed. Please check the log file for details.