SYS_RESTART_POINT

Use the SYS_RESTART_POINT script function to retrieve the restart point from which the object is executed.

Notes:

  • Use the :RESTART script statement to set restart points.
  • Start the task manually by selecting Execute... in the Automic Web Interface, and specify the restart point.

Syntax

SYS_RESTART_POINT ()

Return Codes

  • If the object is executed from a restart point, the script returns the name of the restart point.
  • If the object is not executed from a restart point or is not executed in restart mode, the script function returns a blank.

Example

The following example sets two restart points to copy files from a directory. If the Job restarts at the DB restart point, only files from the database directory and its subdirectories are copied. The script prints information about the applied restart point in the activation report.

:RESTART BIN, "Program directory"  
COPY C:\AEG\BIN\*.* C:\BACKUP\AEG\BIN\*.* /Y

:
INC DOS.ERRORLEVEL

:
RESTART DB, "Database directory"  
XCOPY C:\AEG\DB\*.* C:\BACKUP\AEG\DB\*.* /E /Y

:
INC DOS.ERRORLEVEL

:
SET &RET# = SYS_RESTART_POINT()
:
PRINT "Script was processed from &RET# on."

See also: