Open topic with navigation

# Schedule

The `Schedule` action configures POP3 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: `add` - add a new schedule. `cancel` - cancel (delete) a schedule. `clear` - clear (delete) all schedules. `list` - list schedules. `pause` - pause a schedule. Actions do not run when a schedule is paused. `resume` - resume a schedule that was paused. `update` - update an existing schedule. | 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 `cycles` exceeds the number of `intervals`, the server returns to the start of the list. The default interval for new schedules is 24 hours. The units you can use for setting time durations are: `years`, `months`, `weeks`, `days`, `hours`, `minutes`, and `seconds`. Each unit can be abbreviated to its first letter, for example `3h` instead of `3hours`. Months abbreviates to `m` and minutes to `n`. | 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.

## Examples

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

## Response

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>

- The `cyclesRun` element describes the number of times the scheduled action has run and only appears if the value is greater than zero.
- The `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`.
- The `paused` element indicates whether the schedule is paused and only appears if the value is `true`.

© 2018 Micro Focus or one of its affiliates | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm