Skip to main content
Version: V3 (Ignition 8.3)

system.mes.productionOrder.scheduleProductionOrder

Description

Schedules a production order, optionally updating the scheduled quantity. If quantityScheduled is omitted or None, the existing value on the order is kept.

caution

Throws if the order's status is already CLOSED - no execution operations are permitted on a closed order.

Permissions

This method requires the PRODUCTION_ORDER.EXECUTE permission.

Syntax

system.mes.productionOrder.scheduleProductionOrder(idOrName, [dueDate], [quantityScheduled])

Parameters

ParameterTypeNullableDescription
idOrNameStringFalseThe ULID or name of the production order.
dueDateDateTrueOptional due date. If null, the existing value is kept.
quantityScheduledDoubleTrueOptional new scheduled quantity. If null, the existing value is kept.

Returns

Returns a JSON representation of the updated production order.

Code Examples

# Schedule a production order with a specific quantity
order = system.mes.productionOrder.scheduleProductionOrder(idOrName="ORDER-001", dueDate=system.date.addHours(system.date.now(), 2), quantityScheduled=250.0)
print order["quantityScheduled"]