Automate Schedule - Get job
Declaration
<AMSKYBOT ACTIVITY="get_job" SESSION="text" IP="text" PORT="number" USERNAME="text" PASSWORD="text (encrypted)" HTTPS="YES/NO" PROXYTYPE="text (options)" PROXYSERVER="text" PROXYPORT="number" PROXYUSERNAME="text" PROXYPASSWORD="text (encrypted)" JOBNAME="text" RESULTVARIABLE="text" />
Description
Retrieves information about a job and populates an existing variable with results.
Practical usage
Used to gather information about a particular job.
Parameters
Connection
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Connection | --- | --- | --- | --- | Indicates
where this activity's Automate Schedule credentials should originate from.
The available options are:
NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes. |
Connection - Session
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Session | Text | Yes, if Connection is set to Session | Automate ScheduleSession1 | SESSION="Session1" | The name of the session to associate this activity with. This parameter is active only if the Connection parameter is set to Session. If the Connection parameter is set to Host, this parameter is ignored and the remainder of the parameters specified below becomes active. |
Connection - Host > Credentials
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Server | Number/Text | Yes | (Empty) | IP="xxx.xxx.xxx.xxx" | The Domain Name System (DNS) name (for example, www.domain.com) or IP address (for example, xxx.xxx.xxx.xxx ) of the Automate Schedule Server of where to establish communication. |
Port | Number | Yes | (Empty) | PORT="0880" | The TCP/IP port assigned to enable communication with the Automate Schedule server. |
User name | Text | No | (Empty) | USERNAME="jdoe" | A
valid username of a user configured to access the Automate Schedule
Server. NOTE: Certain Automate Schedule activities
may or may not be permitted depending on the permissions set for
the user. |
Password | Text | No | (Empty) | PASSWORD="text (encrypted)" | The
correct password for the user entered above. Manually enter a password, or click the ![]() |
Session | Text | Yes | (Empty) | SESSION="SkySession" | The name of the session to use to link to other Automate Schedule activities. |
Use Https | Yes/No | No | No | HTTPS="YES" | If selected, specifies that the server protocol type is HTTPS (secure HTTP). If disabled, the server protocol type is HTTP. This parameter is disabled by default. |
Connection - Host > Proxy
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Proxy type | Text (options) | No | Default |
|
The
type of proxy required for Automate Schedule connections that pass through
a proxy server. The available options are:
|
Use authentication | --- | --- | --- | --- | If
enabled, indicates that proxy authentication is implemented. This parameter is active only if the Proxy
type parameter is set to HTTP. NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes. |
Proxy server | Text | No | (Empty) | PROXYSERVER="proxy.host.com" | The hostname (server.domain.com) or IP address (xxx.xxx.xxx.xxx) of the proxy server. This parameter is available only if the Proxy type parameter is set to HTTP. |
Proxy username | Text | No | (Empty) | PROXYUSERNAME="ProxyUser" | The proxy username to use to authenticate and establish the connection. This parameter is available only if the Use authentication parameter is enabled. |
Proxy password | Text | No | (Empty) | PROXYPASSWORD="encrypted" | The
proxy password to use to authenticate and establish the connection. Manually enter a password, or click the ![]() |
Proxy port | Number | No | 8008 | PROXYPORT="8008" | The port to use to connect to the proxy server. This parameter is available only if the Proxy type parameter is set to HTTP. The default value is 8008. |
Job
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Name | Text | Yes | (Empty) | JOBNAME="job1" | The name of the job in which information will be retrieved. Enter the name manually in the provided text box or click the folder icon to open the Automate Schedule browser which allows connection to the server in order to browse available jobs. |
Populate variable with job definition | Text | Yes | (Empty) | RESULTVARIABLE="var1" | The name of an existing variable to populate with information regarding the specified job. |
Additional notes
Enabling Automate Schedule Web Service
By default, Automate Schedule has the web services option disabled. This will prevent Automate Schedule actions from running. To enable the Automate Schedule Web Service, log into Automate Schedule's UI and select from the main menu Admin > System Settings. Scroll down to the Configure Features section and select EDIT. Select Allow Web Service Requests (as shown below) and save the settings.
Example
- Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
- To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.
Description
This sample task demonstrates usage of the Automate Schedule - List jobs and Get job activities. It populates a dataset with a list of all jobs. It then loops through the dataset. During each iteration, a message dialog displays information about the current job on the list.
<AMVARIABLE NAME="theJobInfo" VALUE="" />
<AMSKYBOT SESSION="Skybot_1" IP="10.0.1.69" PORT="8080" USERNAME="BossHog" PASSWORD="AM4UEmv1CjXJZzy+QFvTBjCit7dEQX+ACsvaME" />
<AMSKYBOT ACTIVITY="list_job" SESSION="Skybot_1" RESULTDATASET="theJob" />
<AMLOOP ACTIVITY="dataset" DATASET="theJob"><AMSKYBOT ACTIVITY="get_job" SESSION="Skybot_1" JOBNAME="%theJob.jobname%" RESULTVARIABLE="theJobInfo" /><AMSHOWDIALOG>%theJobInfo%</AMSHOWDIALOG></AMLOOP>
<AMSKYBOT ACTIVITY="get_job" SESSION="Skybot_1" JOBNAME="%theJob.jobname%" RESULTVARIABLE="theJobInfo" />
<AMSHOWDIALOG>%theJobInfo%</AMSHOWDIALOG>
<AMLOOP ACTIVITY="end" />
<AMSKYBOT ACTIVITY="close_skybot" SESSION="Skybot_1" />