# Logger not showing Gateway Scheduled Script running

**URL:** <https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223>\
**Category:** Ignition\
**Created:** [February 23, 2023, 2:23pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223 "2023-02-23T14:23:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bwhite/32/7112_2.png) [@bwhite](https://forum.inductiveautomation.com/u/bwhite)\
**Post date:** [February 23, 2023, 2:23pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/1 "2023-02-23T14:23:13Z")

</div>

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')

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 23, 2023, 2:30pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/2 "2023-02-23T14:30:52Z")

</div>

Mark your code as a preformatted text block so we can see your indentation. ~~There's nothing else obviously wrong.~~ _Except my eyeballs. Sigh._

---

<div class="post-metadata">

**Author:** ![avaughn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/avaughn/32/38972_2.png) [@avaughn](https://forum.inductiveautomation.com/u/avaughn)\
**Post date:** [February 23, 2023, 2:33pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/3 "2023-02-23T14:33:32Z")

</div>

> [@bwhite](#):
>
> system.util.logger("GatewayScript")

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](http://docs.inductiveautomation.com/display/DOC81/system.util.getLogger)

---

<div class="post-metadata">

**Author:** ![bwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bwhite/32/7112_2.png) [@bwhite](https://forum.inductiveautomation.com/u/bwhite)\
**Post date:** [February 23, 2023, 2:44pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/4 "2023-02-23T14:44:21Z")

</div>

I think my eyeballs missed that too!

---

<div class="post-metadata">

**Author:** ![bwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bwhite/32/7112_2.png) [@bwhite](https://forum.inductiveautomation.com/u/bwhite)\
**Post date:** [February 23, 2023, 3:04pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/5 "2023-02-23T15:04:17Z")

</div>

It's still not showing up in the gateway console.

```auto
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.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/a/2aa651ebb377df1eb1d10a4cdfee85b874991e72.png)

---

<div class="post-metadata">

**Author:** ![andrews](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@andrews](https://forum.inductiveautomation.com/u/andrews)\
**Post date:** [February 23, 2023, 3:10pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/6 "2023-02-23T15:10:05Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![bwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bwhite/32/7112_2.png) [@bwhite](https://forum.inductiveautomation.com/u/bwhite)\
**Post date:** [February 23, 2023, 3:12pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/7 "2023-02-23T15:12:00Z")

</div>

it's a gateway scheduled script. I scheduled it for 10:00 am. It's the bottom one.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/1/f13866c92be21c98ef54e28e62fe38bddc4174ea.png)

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [February 23, 2023, 3:12pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/8 "2023-02-23T15:12:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bwhite/32/7112_2.png) [@bwhite](https://forum.inductiveautomation.com/u/bwhite)\
**Post date:** [February 23, 2023, 3:13pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/9 "2023-02-23T15:13:37Z")

</div>

It does not show up there.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [February 23, 2023, 3:14pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/10 "2023-02-23T15:14:14Z")

</div>

OK after you have made the event, did you save the project? Not just the event but the entire project

---

<div class="post-metadata">

**Author:** ![andrews](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@andrews](https://forum.inductiveautomation.com/u/andrews)\
**Post date:** [February 23, 2023, 3:14pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/11 "2023-02-23T15:14:49Z")

</div>

It cuts off from showing the full settings. the weekdays portion is not visible.

Just trying to double check everything.

---

<div class="post-metadata">

**Author:** ![bwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bwhite/32/7112_2.png) [@bwhite](https://forum.inductiveautomation.com/u/bwhite)\
**Post date:** [February 23, 2023, 3:17pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/12 "2023-02-23T15:17:35Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/8/e8ac341c61fa641bd19fa5b0a72296e7b33fa3bf.png)

---

<div class="post-metadata">

**Author:** ![bwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bwhite/32/7112_2.png) [@bwhite](https://forum.inductiveautomation.com/u/bwhite)\
**Post date:** [February 23, 2023, 3:19pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/13 "2023-02-23T15:19:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bwhite/32/7112_2.png) [@bwhite](https://forum.inductiveautomation.com/u/bwhite)\
**Post date:** [February 23, 2023, 3:20pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/14 "2023-02-23T15:20:37Z")

</div>

But it still doesn't show up here???

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/5/a5d13ba4020d81fa888aa2500953371152a6dd77.png)

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [February 23, 2023, 3:21pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/15 "2023-02-23T15:21:30Z")

</div>

None of the one that you have are showing up.

Is the project enabled in the gateway?

---

<div class="post-metadata">

**Author:** ![andrews](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@andrews](https://forum.inductiveautomation.com/u/andrews)\
**Post date:** [February 23, 2023, 3:22pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/16 "2023-02-23T15:22:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bwhite/32/7112_2.png) [@bwhite](https://forum.inductiveautomation.com/u/bwhite)\
**Post date:** [February 23, 2023, 3:23pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/17 "2023-02-23T15:23:16Z")

</div>

Yes. It's in the global project.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/3/23e16d11b358b810d4193923cd81f1589a70a9ac.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 23, 2023, 3:24pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/18 "2023-02-23T15:24:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [February 23, 2023, 3:24pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/19 "2023-02-23T15:24:32Z")

</div>

Like @pturmel said. That was the next thing I was going to have you check.

---

<div class="post-metadata">

**Author:** ![bwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bwhite/32/7112_2.png) [@bwhite](https://forum.inductiveautomation.com/u/bwhite)\
**Post date:** [February 23, 2023, 3:25pm UTC](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223/20 "2023-02-23T15:25:00Z")

</div>

So I need to move the gateway scripts to the KPI project?

[Next page](https://forum.inductiveautomation.com/t/logger-not-showing-gateway-scheduled-script-running/70223.md?page=2)
