Network Deployment (Distributed operating systems), v8.0 > Set up the application serving environment > Administer nodes and resources > Administer nodes remotely using the job manager > Submit jobs


Submit jobs to run wsadmin scripts

In a flexible management environment, you can submit the Run wsadmin script job to run commands in a wsadmin script file on managed targets of the job manager. We must distribute the wsadmin script file before you can submit jobs that run the script file.

Before running the Run wsadmin script job, do the following:

We can use the administrative console of the job manager or the dmgr to submit a job that runs a wsadmin script file on selected targets. From the console, choose the Run wsadmin script job, specify the file, specify job options, schedule the job, review the summary, and submit the job.

Instead of using a console, you can run the runWsadminScript job in the AdministrativeJobs command group. See the Administrative job types topic.


Procedure

  1. Click Jobs > Submit from the navigation tree of the administrative console.

  2. Choose a job to run a script.

    1. Select the Run wsadmin script job type from the list.

    2. Optionally describe the job.

    3. Click Next.

  3. Choose the targets on which to run the script.

    1. Select a group of targets from the list, or select Target names.

    2. If you selected Target names, then specify a target name and click Add, or click Find and specify the chosen targets on the Find targets page.

      For example, suppose that you submitted a job that distributed the extract_server_props.py Jython script file. Specify targets that have a server named server1. If an admin agent or dmgr manages multiple application server targets that have a server named server1, specify only one target. When you specify multiple targets, only the last created server.props file persists. Previously created server.props files are overwritten.

    3. If user authentication is required, specify a user name, password, or any other authentication values as needed.

    4. Click Next.

  4. Specify job parameters.

    1. For Script file location, specify the Destination value given when distributing the script file.

      For example, suppose that you submitted a job that distributed the Jython script file extract_server_props.py and assigned a Destination value of extract_server_props.py. For Script file location, use the destination value:

      extract_server_props.py
      

      For the extract_server_props.py script to run successfully, the targets specified for Target names must have a server named server1.

    2. For Profile location, optionally specify the profile destination value that was given when the file was distributed to the targets.

    3. For Script parameters, specify parameters that are needed to run the wsadmin script.

      If a parameter attribute contains any spaces, place double quotation marks (") around the parameter. If a quoted parameter attribute contains imbedded quotes, put a backslash before the imbedded quotes. For the extract_server_props.py example, optionally specify that wsadmin use the Jython language:

      -lang jython
      

    4. Click Next.

  5. Schedule the job.

    The times and dates that you specify are relative to the job manager.

    1. Optionally specify one or more email addresses where notifications are sent when the job finishes.

    2. Select when the job is available for submission.

      You can submit the job to be available now, or specify a time and date that the job is retrieved from the job manager.

    3. Select the job expiration.

    4. Optionally specify a recurring interval for the job, a start date and time for the interval, and an end date and time for the interval.

    5. Click Next.

  6. Review the summary, and click Finish to submit the job.


Results

The targets run the job.


What to do next

On the Job status page, click the ID of the run wsadmin script job and view the job status. Click the status refresh icon to refresh the displayed status.

If the job is not successful, view any error messages that result from running the job, correct the error condition, and submit the job again.

If the job status is Succeeded, verify that the script ran successfully. For the extract_server_props.py example, when the script runs successfully the targets extract the server1 properties to a file named server.props. A dmgr places the file in its main directory, for example, Dmgr01. A stand-alone target places the file in the main directory of its admin agent, for example, AdminAgent01.
Use wsadmin scripting
Set up a job manager environment
Start and stop the job manager
Start and stop the admin agent
Start and stop the dmgr
Collecting files for the job manager
Distribute files from the job manager to targets
Administer groups of nodes for the job manager
Check job status


Related


Administrative job types using wsadmin.sh
Find targets
Find target resources

+

Search Tips   |   Advanced Search