Use this topic to schedule future recurring administrative jobs in a flexible management
environment using the wsadmin tool.
Before you begin
Configure a job manager, administrative agent, and register nodes with the job manager to set up
a flexible management environment. You can optionally create management groups to simultaneously
submit a job to multiple nodes.
About this task
After configuring your flexible management environment, you can submit, monitor, and manage jobs
for the nodes that are registered with the job manager.
Procedure
-
Launch the wsadmin tool.
Navigate to the app_server_root/bin directory and use the following command to connect the wsadmin tool to
the job manager process:
wsadmin -profileName myJobManager -lang jython
-
Schedule a future administrative job to the job manager.
Use the
submitJob command to submit the future administrative job. Job
submissions consist of the following information:
- Job type
- The job type specifies the type of job to perform. Many jobs exist in the flexible management
environment including application management, product maintenance, configuration, and application
server runtime control jobs.
- Job target
- The job target specifies the node where the job runs.
- Job specific parameters
- Most administrative jobs require configuration information in addition to the job type and
target in order to run the job. Job parameters are specific to each job type.
- Optional generic parameters
- In addition to the job specific parameters, you can include any of the following optional
parameters with the job submission:
Table 1. submitJob optional generic parameter descriptions . Run a submitJob command with its required parameters and with optional
parameters appropriate for your situation.
Parameter |
Description |
Type |
username |
Specifies the username to use to submit the job when security is enabled. |
String |
password |
Specifies the password for the username to use to submit the job when security
is enabled. |
String |
description |
Specifies a description for the job. |
String |
activationDateTime |
Specifies the date and time to activate the job in the format
"2006-05-03T10:30:45-0000" . The -0000 section of the
activationDateTime parameter value represents RFC 822 format. You can specify Z as
a shortcut for Greenwich Mean Time (GMT), such as "2006-05-03T10:30:45Z" . If you do
not specify the time zone, the system uses the time zone of the server. |
String |
expirationDateTime |
Specifies the expiration date for the job, in the format
"2006-05-03T10:30:45-0000" . The -0000 section of the
activationDateTime parameter value represents RFC 822 format. You can specify Z as
a shortcut for Greenwich Mean Time (GMT), such as "2006-05-03T10:30:45Z" . If you do
not specify the time zone, the system uses the time zone of the server. |
String |
expireAfter |
Specifies the amount of time, in minutes, to wait before the job expires. |
Integer |
executionWindow |
Specifies the recurring interval for the job. |
String |
executionWindowUnit |
Specifies the recurring interval unit of measure for the value set by the
executionWindow parameter. Specify DAILY to run the job daily,
WEEKLY to run the job weekly, MONTHLY to run the job monthly,
YEARLY to run the job annually, or CONNECTION to run the job each
time the node connects and polls for jobs. |
String |
email |
Specifies the email address to which the system sends job notifications. |
String |
The following example schedules two weekly recurring jobs. For this example, an application
frequently experiences a memory leak issue. While a development team fixes the application, it might
be necessary to frequently stop and restart the application. The following command examples schedule
the job manager to stop and restart the server once a week, and notifies the system administrator
when the server stops and restarts:
AdminTask.submitJob('-jobType stopServer -targetList [MyNode01]
-jobParams [serverName server1] -activationDateTime 2006-05-03T10:30:45Z
-executionWindowUnit DAILY -executionWindow 13:00:00-14:00:00
-email system_admin@company.com')
AdminTask.submitJob('-jobType startServer -targetList [MyNode01]
-jobParams [serverName server1] -activationDateTime 2006-05-03T10:40:45Z
-executionWindowUnit DAILY -executionWindow 13:00:00-14:00:00
-email system_admin@company.com')
Results
The jobs are submitted to the queue and will run at the date and time specified by the
command.
What to do next
Submit additional administrative jobs to the job manager and monitor existing jobs.