Please enable JavaScript in your browser!
Preparing an archive for Execute scripts remotely task
Expand all | Collapse all
An archive for the Execute scripts remotely task based on a manifest.json file must meet the following requirements:
Archive format: ZIP. Total size: no more than 1 GB. The number of files and folders in the archive is unlimited. The manifest file for the archive must match the schema below and must be named manifest.json. The schema is validated only during task execution on a device.JSON schema of the manifest file and description of arrays
JSON schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title"
: "Schema for execute scripts task",
"type"
: "object",
"properties"
: {
"version"
: {
"type"
: "integer",
"enum"
: [1]
},
"actions"
:{
"type"
: "array",
"items"
: {
"type"
: "object",
"properties"
: {
"type"
: {
"type"
: "string",
"enum"
: ["execute"]
},
"path"
: {
"type"
: "string"
},
"args"
: {
"type"
: "string"
},
"results"
:{
"type"
: "array",
"items"
: {
"type"
: "object",
"properties"
: {
"code"
: {
"type"
: "integer",
"minimum"
: -255,
"maximum"
: 255
},
"next"
:{
"type"
: "string",
"enum"
: ["break", "continue"]
}
},
"required"
: [
"code"
,
"next"
]
}
},
"default_next"
:{
"type"
: "string",
"enum"
: ["break", "continue"]
}
},
"required"
: [
"type"
,
"path"
,
"default_next"
]
}
}
},
"required"
: [
"version"
,
"actions"
]
}
Example of the manifest file
{
"
version
": 1,
"
actions
": [
{
"
type
": "execute",
"
path
": "scripts/run1.cmd",
"
args
": "testArg",
"
results
": [
{
"
code
": 0,
"
next
": "continue"
}
],
"
default_next
": "break"
},
{
"
type
": "execute",
"
path
": "scripts/run2.cmd",
"
results
": [
{
"
code
": 0,
"
next
": "continue"
}
],
"
default_next
": "break"
},
{
"
type
": "execute",
"
path
": "scripts/run3.cmd",
"
results
": [
{
"
code
": 0,
"
next
": "continue"
}
],
"
default_next
": "break"
}
]
}
The archive must be structured as follows:manifest.json
<file1>
<file2>
<folder1>/<file3>
<folder2>/<folder3>/<file4>
...
<fileX>
manifest.json is the manifest file for the task.
<file1>, ...., <fileX>
is the set of files with scripts to be executed.
Page top