Update Schedule method

Use the Update Schedule method to update a schedule to run a service.

HTTP method: PUT

URI: /scheduler/connection_name/schedule_id

Request payload content type: application/xml

Response payload content type: None

Expected response: HTTP/1.1 200 OK

Parameters

The method URI contains the following parameters.

Name Description Required
connection_name Enter the name that identifies the Optim™ directory connection that contains the schedule. Y
schedule_id Enter the schedule ID that identifies the schedule to be updated. Y

Request payload example

The following example shows a request to schedule a service to run on Thursday, August 1, 2013 at 17:30:00 local time (epoch time 1375378200000 in milliseconds).
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:schedule xmlns:ns2="http://www.ibm.com/optim/xsd/scheduler/9.1.0">
    <id>fbf1cdd5-bdf7-4682-96ad-722672af0001</id>
    <serviceId>783015a5-5ad4-43a8-b3be-a45acaba081a</serviceId>
    <startDate>1375378200000</startDate>
    <endDate>0</endDate>
    <repeatCount>0</repeatCount>
    <repeatInterval>0</repeatInterval>
    <schedulerTaskType>SOA_SERVICE</schedulerTaskType>
    <proxyURL>http://servercomputer:12000/</proxyURL>
    <creatorId>jdoe</creatorId>
</ns2:schedule>
The following example shows a request to schedule the service to run on Thursday, August 1, 2013 at 17:30:00 local time. The cron expression sets the schedule to repeat every Thursday afterward at 17:30:00 local time.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:schedule xmlns:ns2="http://www.ibm.com/optim/xsd/scheduler/9.1.0">
    <id>fbf1cdd5-bdf7-4682-96ad-722672af0002</id>
    <serviceId>783015a5-5ad4-43a8-b3be-a45acaba081a</serviceId>
    <startDate>1375378200000</startDate>
    <endDate>0</endDate>
    <cronExpression>0 30 17 ? * THU</cronExpression>
    <schedulerTaskType>SOA_SERVICE</schedulerTaskType>
    <proxyURL>http://servercomputer:12000/</proxyURL>
    <creatorId>jdoe</creatorId>
</ns2:schedule>

Response codes

The following response codes can be received when the method is complete.

Response code Description
200 OK. The service schedule was updated and scheduled.
400 Bad Request. A malformed request was submitted.
404 Not Found. The schedule ID is not found.
409 Conflict. The service ID is already associated with a different schedule.


Feedback