The Schedule
action configures Drupal Connector to run an action automatically on a defined schedule, and is used to manage schedules.
The schedules you define are saved so that they continue to run after the server is restarted. If the server is offline when an action is due to begin, the action is skipped and does not run until the start time for the next cycle.
Type: Synchronous
Parameter | Description | Required |
---|---|---|
ScheduleAction
|
The action to perform:
|
Yes |
Name
|
The name of the schedule. Names are case-sensitive and cannot begin with an underscore. | Required when ScheduleAction is add , cancel , pause , resume , or update . |
When you set ScheduleAction=add
or ScheduleAction=update
, use the following parameters to define the schedule:
Parameter | Description | Required |
---|---|---|
_action
|
The name of the action to schedule. | Required to add a schedule. |
_parameter
|
A parameter to pass to the scheduled action each time it runs (replace parameter with the actual parameter name). |
No |
AllowParallel
|
A Boolean value that specifies whether to run the scheduled action if the previous occurrence is still running or queued. This parameter has a default value of false for new schedules. |
No |
Cycles
|
The maximum number of times to run the action. If you do not set this parameter when adding a new schedule, there is no limit on how many times the action can run. | No |
End
|
The date and time at which to end the schedule. Specify the value in the format YYYY-SHORTMONTH-DD HH:NN:SS . If you do not set this parameter when adding a new schedule, the schedule runs indefinitely. |
No |
Intervals
|
A comma-separated list of time durations, to specify how long the server waits before running the action again. If the number of The units you can use for setting time durations are: |
No |
Start
|
The date and time at which to start the schedule. Specify the value in the format YYYY-SHORTMONTH-DD HH:NN:SS . If you do not set this parameter when adding a new schedule, the schedule starts immediately. |
Required when updating the intervals for a schedule. |
The following example runs the BackupServer
action at midday on weekdays, starting on Monday 29th January 2018, for 10 weeks:
/action=schedule&scheduleaction=add &name=WeekdayBackups &start=2018-JAN-29 12:00:00 &intervals=24h, 24h, 24h, 24h, 72h &cycles=50 &_action=BackupServer &_path=./backups/
The following example lists schedules that you have defined:
/action=schedule&scheduleaction=list
The following example updates the number of cycles in the WeekdayBackups
schedule:
/action=schedule&scheduleaction=update &name=WeekdayBackups &cycles=100
The following example removes the WeekdayBackups
schedule:
/action=schedule&scheduleaction=cancel &name=WeekdayBackups
The following example removes all schedules:
/action=schedule&scheduleaction=clear
The following is an example response from /action=schedule&scheduleaction=list
<autnresponse xmlns:autn="http://schemas.autonomy.com/aci/"> <action>SCHEDULE</action> <response>SUCCESS</response> <responsedata> <schedule> <name>WeekdayBackups</name> <action> <name>backupserver</name> <parameter name="path">./backups</parameter> <parameter name="scheduledTask">true</parameter> </action> <start>2018-Jan-29 12:00:00</start> <intervals>1 day, 1 day, 1 day, 1 day, 3 days</intervals> <cycles>50</cycles> <cyclesRun>2</cyclesRun> <allowParallel>true</allowParallel> <paused>true</paused> </schedule> </responsedata> </autnresponse>
cyclesRun
element describes the number of times the scheduled action has run and only appears if the value is greater than zero.allowParallel
element specifies whether a scheduled action occurs if the previous occurrence is still running or queued, and only appears if the value is true
.paused
element indicates whether the schedule is paused and only appears if the value is true
.
|