Skip to end of metadata
Go to start of metadata
Description

Add a new schedule entry for the given line path.

Info

The function requires an additional argument on the Gateway script which is the name of the project.
Syntax

system.schedule.addScheduleEntry(linePath, workOrder, scheduleType, start, runStart, finish, quantity, userName, note)


  • Parameters

String linePath - Line path to add the schedule entry to.

String workOrder - Work order that the schedule entry is associated with.

Integer scheduleType -The type of schedule entry. 0=Workorder, 1=Maintenance.

Date start - The date and time when this schedule entry is to start changeover.

Date runStart - The date and time when this schedule entry is to start production.

Date finish - The date and time when this schedule entry is estimated to be finished.

Integer quantity -The quantity of units to produce.

String userName - The user name that added the schedule entry.

String note -Notes to associate with this schedule entry.

  • Returns

Integer - ID of the new schedule entry.

  • Scope

All

Code Examples
Code Snippet
start = system.date.getDate(2016, 3, 15)
runStart = system.date.getDate(2016, 3, 17)
finish = system.date.getDate(2016, 3, 31)

linePath = '[global]\Nuts Unlimited\Folsom\Mixing\Mixing Line 1'

schEntry=system.schedule.addScheduleEntry(linePath, 'WO_PC001', 1, start, runStart, finish, 2000, 'Sarah', 'new schedule')
print schEntry
Output
 3

 

 

  • No labels