Automation Engine Script Guide > Ordered by Function > Read or Modify Objects > GET_SYNC

GET_SYNC

Script Function: Queries the current condition or value of a Sync objectIt synchronizes executable objects based on defined states and actions. A particular Automation Engine object type..

Syntax

GET_SYNC(Sync, Type)

Syntax

Description/Format

Sync

Name of a Sync object whose current condition or value should be determined
Format: AE name, script literal or script variable

Type

Specification of whether current condition or current value should be determined
Format: AE name, scriptA particular Automation Engine object type. literal or script variableA placeholder for a value within a script.

Allowed values: "STATE" and "VALUE"
"STATE" - Current condition
"VALUE" - Current value


Return codes

Current condition of the Sync object
Current value of the Sync object

Comments

This script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… supplies the current settings of a Sync object. These settings are also found in the Attributes tab.

Example

The following script lines refer to the example Using Sync Objects for Accesses of Jobs.

:SET &ADMIN# = GET_SYNC("DB.STATE","STATE")
:
IF &ADMIN# = "EXCLUSIVE"
:
 PRINT "The administrator job is currently exclusively using the database."
:
ENDIF


:
SET &RET# = GET_SYNC("DB.STATE","VALUE")
:
IF &RET# = 0
:   
PRINT "No job is currently using the database."
:
ELSE
:   
PRINT "&RET# jobs are currently using the database."
:
ENDIF

 

See also:

Script element Description

SET_SYNC

Executes the defined actionActions are predefined building blocks for recurring activities. They are commonly used for managing third party systems or in deployment scenarios. of a Sync object
:ATTACH_SYNC Assigns a Sync object to a taskAn executable object that is running. Tasks are also referred to as activities.

Script Elements - Read or Modify Objects

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by function

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH