---
title: "Starting Next Scheduled OEE Operation via Script 3.0"
id: "starting-next-scheduled-oee-operation-via-script-3-0"
project: "Knowledge Base"
url: "https://docs.sepasoft.com/articles/knowledge-base/starting-next-scheduled-oee-operation-via-script-3-0"
updated: 2026-07-23T18:08:44Z
---

# Starting Next Scheduled OEE Operation via Script 3\.0

This example demonstrates how to begin the next scheduled entry for a given Line.

Similar to the Right-click - Begin OEE Run action on the MES Schedule Selector:

![](/resources/Storage/knowledge-base/starting-next-scheduled-oee-operation-via-script-3-0/image2022-12-15_14-49-34.png)

Schedule Begin

Code

```
#specify equipment path
eqPath = 'Enterprise\El Dorado Hills\Packaging Area\Packaging Line 1'

#check if there are active operations first
ops = system.mes.oee.getOEEAllActiveSegments(eqPath)
if ops.size() == 0:

	#specify the start and end dates to retrieve schedules
	begin = system.date.now()
	end = system.date.addDays(system.date.now(), 5)
	   
	#specify the category
	category = 'Active'
	   
	#get schedule entries
	list = system.mes.getEquipmentScheduleEntries(eqPath, begin, end, category, False)
	print list
	for item in list:
	    print item.getScheduledStartDate()
	    if item.hasMESOperationsScheduleLink():
	        print item.getMESOperationsScheduleLink()
	        print item.getMESOperationsRequestLink(), '; Operations Request'
	          
	        if item.hasMESOperationsResponseLink():
	            print item.getMESOperationsResponseLink(), '; Operations Response'
	      
	        else:
	        	#begin OEE Run
	            system.mes.oee.beginOEERun(item.getMESOperationsRequestLink()) 
	          
	    break


```
