Automate Schedule - List jobs

Declaration

<AMSKYBOT ACTIVITY="list_job" SESSION="text" RESULTDATASET="text" VARBINDNAMES="text" VARBINDVALUES="text" />

Related Topics   

Description

Retrieves a list of jobs matching the filter parameters specified (if any) and populates a dataset with the name of each job.

NOTE: To see the list of jobs, you must have View authority to the "Jobs" secured object.

Practical Usage

Can be used to gather up a list of jobs in order to perform subsequent Automate Schedule activities on them.

Parameters

Connection

Property

Type

Required

Default

Markup

Description

Connection

---

---

---

---

Indicates where this activity's Automate Schedule credentials should originate from. This is a visual parameter used only during design-time, thus, contains no properties or markups. The available options are:

  • Host - Denotes that a custom set of credentials will be entered for this activity. This option is normally selected if only a single Automate Schedule activity is required to complete a task or operation.

  • Session - Denotes that credentials should derive from a session created by a previous Create session step. This allows several Automate Schedule activities to be linked to a particular session, eliminating redundancy. Multiple sessions can exist within a single task, allowing several Automate Schedule operations to be automated concurrently.

Session

Text

Yes if Connection parameter 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.

NOTE: Use the End Session activity to end an active Automate Schedule session.

Server

Text/Number

Yes if Connection parameter set to Host

(Empty)

  1. IP="12.452.444.41"
  2. IP="www.domain.com"
The Domain Name System (DNS) name (i.e. www.domain.com) or IP address (i.e. 93.184.216.119 ) of the Automate Schedule Server with which to establish communication.
Port

Number

Yes if Connection parameter set to Host

(Empty)

PORT="8008"

The TCP/IP port assigned to allow communication with Automate Schedule.

User name

Text

Yes if Connection parameter set to Host

(Empty)

USERNAME="SuperFlyBot"

A valid username of a user configured to access Automate Schedule.

NOTE: Certain Automate Schedule activities may or may not be permitted depending on the permissions set for the user.

Password

Text

Yes if Connection parameter set to Host

(Empty)

PASSWORD="encrypted" A valid password configured for the username entered above.

Proxy type

Text (options)

No

Default

  1. PROXYTYPE="none"

  2. PROXYTYPE="http"

The type of proxy required for Automate Schedule connections that pass through a proxy server. The available options are:

  • System default (default) - Points to the default proxy used by the system.

  • None - No proxy authentication required.

  • HTTP - Proxytype is HTTP.

Use authentication

---

---

---

---

If enabled, indicates that proxy authentication is implemented, thus, the authentication-based parameters specified below are put into effect. This is a design-time parameter, therefore, contains no properties or markups. It is active only if the Proxy type parameter is set to HTTP.

Proxy server

Text

No

(Empty)

PROXYSERVER="proxy.host.com"

The host name (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 authenticate with. This parameter is available only if the Use Authentication parameter is enabled.

Proxy password

Text

No

(Empty)

PROXYPASSWORD="encrypted"

The proxy password to authenticate with. This parameter is available only if the Use Authentication parameter is enabled.

Proxy port

Number

No

8008

PROXYPORT="8008"

The port that should be used 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

Create and populate dataset with job names

Text

Yes

(Empty)

RESULTDATASET="jobList"

The name of the dataset to create and populate with job listing. For more details, see Datasets below.

Filter

Property

Type

Required

Default

Markup

Description

Field name

Text

No

(Empty)

VARBINDNAMES="theFieldName"

The field name to associate with the value entered under the Field value parameter. This enables filters to be set by way of name/value pair. For more details, see Filters below.

Field value

Text

No

(Empty)

VARBINDVALUES="theValue"

The field value that should match the field name selected under the Field name parameter.  This enables filters to be set by way of name/value pair. For more details, see Filters below.

 

Description

Error Causes

On Error

Additional Notes

Datasets

A dataset is a multiple column, multiple row container object. This activity creates and populates a dataset containing a specific field in addition to the standard dataset fields. The table below describes this field (assuming the dataset name assigned was theDataset).

Name

Type

Return Value

theDataset.jobname

Text

Returns the name assigned for the job.

Filters

This activity features a filtering mechanism designed to examine each output request for certain qualifying criteria. You determine which objects to filter by way of name/value pair, whereby, only objects with values matching the field name you specify will qualify.  

To add a filter:

  1. Click the Add button. A Filter Editor dialog appears (as shown below).

  1. In the Field Name parameter, click the drop-down arrow and select from the available fields in which to filter. Note that field names vary depending on the activity.
  2. In the Value parameter, enter a value that should match the selected field name.
  3. Click OK when finished.

To Edit a Filter:

  1. Select a Field Name/Value pair listed under the Filter property.
  2. Click the Edit button to open the Filter Editor dialog.
  3. Make appropriate changes then click OK when finished.

To Delete a filter:

  1. Select a Field Name/Value pair listed under the Filter property.
  2. Click the Remove button to permanently delete the filter.

Enabling Automate Schedule Web Service

By default, Automate Schedule has the web services option disabled. This will prevent Automate's 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 click the EDIT link. Check the Allow Web Service Requests check box (as shown below) and save the settings.

Example

NOTE:
  • The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
  • Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.

Description

This sample task demonstrates usage of the List jobs and Get job activities. A List jobs step populates a dataset with a list of jobs on the server. A Loop dataset step is then used to loop through the dataset. During each iteration, a Get job step retrieves information about each job and displays the data in a message dialog.

Copy
<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" />