Create a scheduled optimization

Create large scheduling queries to be run at a specified time daily, weekly, or monthly.

Batch optimization creates valid schedules for large data sets of work that takes into account location and routing, resource skill requirements, and inclusion/exclusion lists.

Some limitations apply to the number of items included in an optimization request. See Usage limitations for more information about optimization request limits.

Batch optimization relies on the optimization solver to solve work and resource scheduling problems over a period of time to produce a valid schedule.

The longer the solver is allowed to run, the better the schedule is likely to be with regards to job and resource constraints such as travel time and availability.

Batch optimization can be scheduled to run at a later time, and can be made to run on a recurring schedule.

This means that schedulers can have the same optimization query scheduled to run at the same time daily, weekly, or monthly to produce schedules in advance.

Creating an optimization schedule

The /optimization endpoint handles up to 2000 jobs and up to 200 resources in an optimization request. We anticipate being able to work with a higher number of jobs and resources in the near future.

See the API documentation for more information about the /optimization endpoint.

Using the API to schedule batch optimization requests requires knowledge of GraphQL and EQLFilters.

The jobQuery and resourceQuery request fields require an EQLFilter to identify which jobs and resources are to be included in the optimization request.

The following EQL filters are an example of filters that might be useful in batch queries:

Filter Description
JobStatus == "Queued" All jobs with a Queued status
EmploymentType == "Full-time" All employees with the Full-time employment type
UID IN ['<JobUID>', '<JobUID>', etc] Add specific jobs by their UID

In the following example, the batch optimization will run daily, starting no earlier than 8PM and finish no later than 11PM. It will optimize all Queued jobs in the Brisbane region for all available Full-time resources.

{
  "name": "Brisbane",
  "jobQuery" : "UID IN ['00140338-dd6c-4154-8e6e-1356d88f5817', '0014f816-8797-4f7a-aee4-404c4b63f3fa', '0014eb38-09d2-4392-b1dc-50d68460a5bf']",
  "resourceQuery" : "EmploymentType == 'Full-time'",
  "region" : "00030443-08b8-4612-a55a-75cb600e2729",
  "runDate" : "2020-06-10",
  "timezone": "Australia/Brisbane",
  "earliestStartTime" : "20:00:00",
  "latestEndTime" : "23:00:00",
  "dayRange" : 1,
  "dayOffset" : 1,
  "recurring" : {
    "step" : 1,
    "repeatMode" : "daily",
    "endAfterNumberOccurrences" : 1,
    "repeatOnWeekDays" : [
      "sun",
      "mon",
      "tue",
      "wed",
      "thu",
      "fri",
      "sat"
    ]
  }
}

When created successfully, the request returns an ID for the batch, which can be used to update or modify the batch optimization:

{
  "id": "d6af2490-b9de-4a75-b3fd-b591bce928ef"
}

Return a list of existing batch optimization runs by making a GET request to /optimization/batch/schedule.

This returns all optimization batch runs scheduled for your organization.

Deleting optimization schedules

You can delete an optimization schedule using the Skedulo web application or the API.

To delete the optimization schedule using the UI:

  1. Open Settings -> Optimization schedules page in the web application.
  2. Select the schedule or schedules that you would like to delete.
  3. Click the Delete icon in the menu bar above the schedule table.

To delete a schedule using the API:

  1. Get the schedule ID for the batch run you want to delete. You can find this using aGET request to the /optimization/batch/schedule endpoint, which lists all current batch optimization schedules.
  2. Send a DELETE request to the /optimization/batch/schedule/{schedule_id}.