Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • env( "environment-variable", "default" )
    • The function reads the value of an existing OS environment variable. The name has to be specified in correct uppercase/lowercase spelling.
    • If the environment variable does not exist then an error is raised and the Order fails. Alternatively a default value can be specified.
    • Examples:

      Expression
      env( ('JS7_AGENT_CONFIG_DIR')
      JSON"env( 'JS7_AGENT_CONFIG_DIR' )"
      Sample Value/var/sos-berlin.com/js7/agent/var_4445/config
      Expression
      env( 'JAVA_HOME', '/usr/lib/jvm/java-1.8-openjdk' )
      JSON"env( 'JAVA_HOME', '/usr/lib/jvm/java-1.8-openjdk' )"
      Sample Value/usr/lib/jvm/java-1.8-openjdk
      Expression
      env( 'HOSTNAME', env( 'COMPUTERNAME' ) )
      JSON"env( 'HOSTNAME', env( 'COMPUTERNAME' ) )"
      Sample Value2021-05-03 07:30:42

      This example assumes the $HOSTNAME environment variable to be available for Agents running on Unix or the %COMPUTERNAME% environment variable to be available for Agents with Windows.


  • now( format='yyyy-MM-dd hh:mm:ss', timezone='Europe/Berlin' )
    • The job start date. This date can be formatted using Java date qualifiers. Optionally a time zone can be specified, by default the UTC time zone is used.
    • Examples:


      Expression
      now( format='yyyy-MM-dd' )
      JSON"now( format='yyyy-MM-dd' )"
      Sample Value2021-05-03
      Expression
      now( format='yyyy-MM-dd hh:mm:ss' )
      JSON"now( format='yyyy-MM-dd hh:mm:ss' )"
      Sample Value2021-05-03 07:30:42
      Expression
      now( format='yyyy-MM-dd  hh:mm:ssZ', timezone="Europe/Berlin" )
      JSON"now( format='yyyy-MM-dd hh:mm:ssZ', timezone=\"Europe/Berlin\" )"
      Sample Value2021-05-03 09:30:42+02:00

...