SaveSchedulerSettings

Syntax

SchedulerContainerSaveSettingsResult SaveSchedulerSettings(SchedulerId tScheduler, SchedulerContainerSaveSettingsArg tArg)

Parameters

tScheduler. Opened schedules tasks container instance moniker.

tArg. Operation execution parameters.

Description

The SaveSchedulerSettings operation saves scheduled tasks container settings to file.

Comments

Task container settings include authentication method and credentials used on task scheduler startup. To save the settings to XML file, in the tScheduler field specify task container instance moniker, and in the tArg field specify the settings to be saved. The moniker can be obtained on executing the OpenScheduler operation.

The operation results in the string containing XML structure with settings. The obtained XML structure can be further saved to file or used in some other way.

Example

Below is the example of saving task container settings to file. The request contains opened task container instance moniker. The response contains the obtained file contents as a string.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SaveSchedulerSettings xmlns="http://www.fsight.ru/PP.SOM.Som">
<tScheduler xmlns="">
  <id>S1!M!6445</id>
  </tScheduler>
<tArg xmlns="">
  <auth>Password</auth>
  <passEncr>true</passEncr>
  <saveAuth>true</saveAuth>
  <user>User</user>
  <pass>Password</pass>
  </tArg>
  </SaveSchedulerSettings>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SaveSchedulerSettingsResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <fileString xmlns=""><Metabases><WAREHOUSE Name="WAREHOUSE" Authentication="1" Driver="MSSQL2012" Package="STANDARDSECURITYPACKAGE" DebugMode="0"><LogonData DATABASE="WAREHOUSE" SERVER="V-NRSPO-MSSQL.DEV.FS.FSIGHT.WORLD"/><Credentials Authentication="6"><Key Name="Item0" Realm="SCHEDULER" Crs="U2FsdGVkX1/7wv/vwTyST3NWbsCyLSHOVEi3ioB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></Credentials><TaskContainer KEY="6445" ID="TASKS_CONTAINTER" RestartSecs="30"/></WAREHOUSE></Metabases> </fileString>
  </SaveSchedulerSettingsResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SaveSchedulerSettings" :
{
"tScheduler" :
{
"id" : "S1!M!6445"
},
"tArg" :
{
"auth" : "Password",
"passEncr" : "true",
"saveAuth" : "true",
"user" : "User",
"pass" : "Password"
}
}
}

JSON response:

{
"SaveSchedulerSettingsResult" :
{
"fileString" : "<Metabases><WAREHOUSE Name="WAREHOUSE" Authentication="1" Driver="MSSQL2012" Package="STANDARDSECURITYPACKAGE" DebugMode="0"><LogonData DATABASE="WAREHOUSE" SERVER="V-NRSPO-MSSQL.DEV.FS.FSIGHT.WORLD"\/><Credentials Authentication="6"><Key Name="Item0" Realm="SCHEDULER" Crs="U2FsdGVkX1\/7wv\/vwTyST3NWbsCyLSHOVEi3ioBPizEGVHHZureeblMKfkg92AM nrDPkksWlePClh7L8U7+8QU3lKQJ6G0IRyYcdaXpBNnoLE3kdzaBXIU+PMD2yZBW 1KZZ5ebZ+JcnJsYCOeGedpM804g7epCO3Tk6Iao8tNdXoU4q8n246pUImIkdttaK zPDM7e46bHQ5inBPn5PoFQNO1wWkt1GYtCxfgBdD1uWR+9LxiruiMkbvKtS5k7TK 3xg8qpC4ZUTDPHSZ\/IBq2e2\/N09PscEzFz7jy+K7cVrI77tbv+MFuI1fgUTudKr\/ jikWZWUDRGNzrcdyNwSs1nHGmR0S3oideFTqS2j5NrEcKCyluZlvqnYWxGsyp6a9 03kOOD8qFtV7jUjDemDC8xhFbZcKZGRhjhrbzmeCQxp18mvkafdYayDy0JjpkqL4 GV0tQ0xHGNBH0OjPYU\/WZZoM3ecFt2P2koi3dfwQq9LHtW5\/qfr8dwSfxH2zMn\/C APKMF3EsHfDZwf0ncokWbt+cKLHB2DYgh+DzAdtMiUvymTdkk9KbOd5BPkGglhzc abh7kzlWHzE0eIofuVSzdKj+Efn\/YRZn+JsyGBFy4Tr76xlsNRd27wB6m0ru2X8x ttEK4SRi3nzByuxhLdtkpVrElNlWlsRZ64gHFZ\/7upUXO+jLM3Idf3ILtXgQKrgW Jfb2NQLEKnx4RPYiJYgRF2+uE51QrH7pBNcB2ghksK6gQvy6olc3qPO5c47H89ej 8xo4V\/y9\/exO2PuyGVaCUvc82nK9W7pYZItvdudbt9STZ\/qLylbkPd4ttevp+cCr 7izE4GMmaoy3rrbTfZY+0L7RmBUgvdQ6E6AOuj7oHXJLMlBkQEJQbCE1gs\/3C1sX 1L5f2L2dHh\/erQeDngfEXtjpwp32dWBDBlehUcKqcEcwHrXFj7gEQqsFrDFxG6xv uIWvTde1kphO6765FHbx5qA==" Crsa="MHEPECMMDHOIFOAEHEOCMIPBKPLPGJCENJNPLIOJPFBMJMPD:\/\/gos"\/><\/Credentials><TaskContainer KEY="6445" ID="TASKS_CONTAINTER" RestartSecs="30"\/><\/WAREHOUSE><\/Metabases> "
}
}
public static SchedulerContainerSaveSettingsResult SaveSettings(SchedulerId moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
//Operation execution parameters
var tSave = new SaveSchedulerSettings()
{
tScheduler = moniker,
tArg = new SchedulerContainerSaveSettingsArg()
{
saveAuth = true,
auth = AuthenticationMode.Password,
passEncr = true,
user = "User",
pass = "Password"
}
};
//Save settings
var tResult = somClient.SaveSchedulerSettings(tSave);
return tResult;
}

See also:

Working with Scheduled Tasks Container