Hello,
I have a timed gateway event script that does not seem to be running and I do not know why
Here is the code:
def runAction(self, event):
subject = "Alert: Long Session Detected"
body = "Testing"
system.util.getLogger("Session Email Script").info("Email sent successfully")
recipient = ["demo@email.com"]
smtpProfile = "alertSmtp" # This matches the email profile in the Gateway
try:
system.net.sendEmail(
smtpProfile=smtpProfile,
fromAddr="alert@station.com",
subject=subject,
body=body,
to=recipient
)
system.util.getLogger("Session Email Script").info("Email sent successfully")
except Exception as e:
system.util.getLogger("Session Email Script").info("Failed to send Email: %e" % str(e))
What could be the reason the code is not bring executed in the gateway?
Thank You