Does the machine and part data actually change within 30 seconds assuming all params are the same? If so then fair enough way to handle it, but if not I’d do it on an event.
Do you have your global scripting project set? Expression and runScript problem - #9 by dkhayes117
Though I suppose it shouldn’t matter for system.date since you are getting that far. Hm idk. Somewhere it’s losing context.
You could try putting a import system at the top of your getAllActiveShifts function would resolve it but it’s icky to be importing system packages but you may just have to because it’s being called async on the gateway scope. Here’s an IA employee doing exactly that Changing Perspective Project from Session - #2 by cmallonee