Automate Schedule - Run job suite

Declaration

<AMSKYBOT ACTIVITY="run_job_suite" SESSION="text" JOBSUITENAME="text" INSTANCEIDVARIABLE="text" />

Related Topics   

Description

Forces a job suite to start. When a job suite runs, all of the assigned jobs

NOTE: To run job suites, you must have Execute authority to the "Job Suites" secured object.

Practical Usage

Use this activity along with available Automate triggers to run a job suite upon occurrence of an event or condition.

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 Suite

Property

Type

Required

Default

Markup

Description

Name

Text

Yes

(Empty)

JOBSUITENAME="jobSuite1"

The name of the job suite to run. 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 job suites.

Populate variable with instance ID

Text

Yes

(Empty)

INSTANCEIDVARIABLE="var1"

The name of an existing variable to populate with the job suite's globally unique instance ID.

 

Description

Error Causes

On Error

Additional Notes

Allowing Web Service Requests

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-mark 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

Sample 1:

This simple task starts a Automate Schedule session, runs a job suite, and thereafter, ends the session.

Copy
<AMSKYBOT SESSION="Skybot_1" IP="10.0.1.69" PORT="8008" USERNAME="admin" PASSWORD="AM4n/f/IR19kaoAqhBATg8yxaodODZXlTEDaME" />
<AMSKYBOT ACTIVITY="run_job_suite" SESSION="Skybot_1" JOBSUITENAME="JobSuite1" />
<AMSKYBOT ACTIVITY="close_skybot" SESSION="Skybot_1" />

Sample 2:

This is a more complex task that demonstrates Automate's ability to run a Automate Schedule job suite. It includes the use of variables and performs additional Automate Schedule activities. Each step is described below:

  1. Creates a variable with the name of job suite to run as its value.
  2. Creates a variable which will later be used to retrieve the instance ID.
  3. Creates a variable which will later be used to retrieve the job status.
  4. Starts a Automate Schedule session.
  5. Runs the selected job suite.
  6. Waits for the job suite to complete its execution.
  7. Writes the job suite name, instance ID and job status to the Windows event log (using associated variables).
  8. Ends the Automate Schedule session.
Copy
<AMVARIABLE NAME="skybot_job_suite_name" VALUE="Sample_run_suite_from_Automate" DESCRIPTION="A sample job suite which will be started by Automate" />
<AMVARIABLE NAME="job_suite_history_id" VALUE="" />
<AMVARIABLE NAME="job_status" DESCRIPTION="job history run id of the triggered job run" VALUE="" />
<AMSKYBOT SESSION="sample_skybot_job_suite_task" IP="skybot.server.name" PORT="4456" USERNAME="the_user" PASSWORD="AM4Ajaj4d0VXkLmYGd6v9vrgGEXsmYuP9mMaME" />
<AMSKYBOT ACTIVITY="run_job_suite" SESSION="sample_skybot_job_suite_task" JOBSUITENAME="%skybot_job_suite_name%" INSTANCEIDVARIABLE="job_suite_history_id" />
<AMSKYBOT ACTIVITY="wait_job_suite" SESSION="sample_skybot_job_suite_task" INSTANCEID="%job_suite_history_id%" RESULTVARIABLE="job_status" TIMEOUT="0" />
<AMEVENTLOG MESSAGE="Skybot Job Suite: %skybot_job_suite_name%&#xD;&#xA;Run ID: %job_suite_history_id%&#xD;&#xA;Status: %job_status%" />
<AMSKYBOT ACTIVITY="close_skybot" SESSION="sample_skybot_job_suite_task" />