6 Replies Latest reply on Nov 5, 2014 6:57 AM by Jeff Strauss

    Best practice tip for scripts

    Jeff Strauss

      Part of the backup script does a tabadmin stop so that we can do a cleanup and then we take it right back online again.  I've had to open the script up during the day before, and one time double clicked on it and it inadvertently caused an interruption.  Doh...

       

      I fixed this a while back by a safegauard mode (needing to pass in a parm), and I thought I would share.

       

      REM *****************************************************************************************************************************

      REM ***Bypass processing if there is no parm value of "1" passed in            ******************************************

      REM *****************************************************************************************************************************

      SET PARM_ACTIVE_FLAG=%1

      SET DUMMYPARM=1

       

      IF %PARM_ACTIVE_FLAG%%DUMMYPARM%==11 (GOTO CONTINUE_PROC )

       

      :BYPASS_PASSIVE

        ECHO Parm flag is not active.  Source capture bypassed  %PARM_ACTIVE_FLAG%

        GOTO END_PROC

       

      :CONTINUE_PROC