I'm running this on my scheduled gateway script in Ignition 8.1, and it isn't showing in the logger. What am I doing wrong?
def onScheduledEvent():
logger = system.util.logger("GatewayScript")
logger.info('Email Reports at Test Time')
I'm running this on my scheduled gateway script in Ignition 8.1, and it isn't showing in the logger. What am I doing wrong?
def onScheduledEvent():
logger = system.util.logger("GatewayScript")
logger.info('Email Reports at Test Time')
Mark your code as a preformatted text block so we can see your indentation. There's nothing else obviously wrong. Except my eyeballs. Sigh.
The function is system.util.getLogger()
so this line should be changed to system.util.getLogger("GatewayScript")
UM page: system.util.getLogger - Ignition User Manual 8.1 - Ignition Documentation
I think my eyeballs missed that too!
It's still not showing up in the gateway console.
def onScheduledEvent():
logger = system.util.getlogger("GatewayScript")
logger.info('Email Reports at Test Time')
I had this scheduled for 10:00 and nothing showed up.
I assume this is a Gateway timer event script.
Is it set to dedicated or fixed. Can you post more details on that?
Are you sure it executed?
Does the script show up in the gateway? Look at the gateway webpage -> Status -> Gateway Scripts and see if it showing there. If it is then it should have any errors or last time it was executed.
It does not show up there.
OK after you have made the event, did you save the project? Not just the event but the entire project
It cuts off from showing the full settings. the weekdays portion is not visible.
Just trying to double check everything.
I did apply and save the project. It shows in the gateway log that I restarted Gateway Scripts when I saved. I'm actually closing out the gateway script page by saying OK this time and trying again at 10:20.
None of the one that you have are showing up.
Is the project enabled in the gateway?
For testing purposes, I would open up the running scripts page in the gateway.
Set it to go off in 3-5 minutes from now.
Then monitor that page and see if it runs.
You could also toss is tag write somewhere just to cross verify if it executed.
Events don't run in inheritable projects. Leaf projects that don't have any events will inherit that and run them.
Don't define events in inheritable projects. Ever.
Like @pturmel said. That was the next thing I was going to have you check.
So I need to move the gateway scripts to the KPI project?