# Gateway Scheduled Scripts

**URL:** <https://forum.inductiveautomation.com/t/gateway-scheduled-scripts/86642>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [March 1, 2024, 12:05am UTC](https://forum.inductiveautomation.com/t/gateway-scheduled-scripts/86642 "2024-03-01T00:05:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_Huang](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@Bill\_Huang](https://forum.inductiveautomation.com/u/Bill_Huang)\
**Post date:** [March 1, 2024, 12:05am UTC](https://forum.inductiveautomation.com/t/gateway-scheduled-scripts/86642/1 "2024-03-01T00:05:12Z")

</div>

Hi everyone, I'm currently trying to export a table from database in Excel format every week.  
I have tried to use the Gateway scheduled scripts, and seems it would execute as expected. But I couldn't find the file under the file path.  
The script itself works fine when I run it in the Script Console.  
Could anyone give me some clue about it?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/0/d06569a738cd720aab91b2368fb043c2b6abc62e.png)

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [March 1, 2024, 12:08am UTC](https://forum.inductiveautomation.com/t/gateway-scheduled-scripts/86642/2 "2024-03-01T00:08:47Z")

</div>

Script console is a modified client scope (Runs on your/designer computer), gateway scheduled scripts run in a gateway scope(Runs on the gateway machine). Did you check that path on the gateway machine to see if there were files there? Are there any errors in the logs around the time the script runs?

This script is either running into permissions issues on the gateway server, where the ignition service might not have write access to the specified location, or you are running into the problem of the specified folder not existing.

---

<div class="post-metadata">

**Author:** ![Bill\_Huang](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@Bill\_Huang](https://forum.inductiveautomation.com/u/Bill_Huang)\
**Post date:** [March 1, 2024, 12:22am UTC](https://forum.inductiveautomation.com/t/gateway-scheduled-scripts/86642/4 "2024-03-01T00:22:14Z")

</div>

Thank you ryan. How Can I check the path on the gateway machine? I have just started to learn Ignition.

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

According to the gateway status, the scripts has been executed successfully, so I believe the file might exist under the path of the gateway machine.

And is it possible to run a scheduled scripts under the client scope instead of the gateway scope?

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [March 1, 2024, 12:22am UTC](https://forum.inductiveautomation.com/t/gateway-scheduled-scripts/86642/5 "2024-03-01T00:22:28Z")

</div>

> [@Bill\_Huang](#):
>
> How Can I check the path on the gateway machine?

You would have to remotely connect to the server that is running Ignition and browse through the file system there.

> [@Bill\_Huang](#):
>
> And is it possible to run a scheduled scripts under the client scope instead of the gateway scope?

Nope, scheduled scripts are gateway scoped only.

---

<div class="post-metadata">

**Author:** ![Bill\_Huang](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@Bill\_Huang](https://forum.inductiveautomation.com/u/Bill_Huang)\
**Post date:** [March 1, 2024, 12:23am UTC](https://forum.inductiveautomation.com/t/gateway-scheduled-scripts/86642/6 "2024-03-01T00:23:49Z")

</div>

Ok I'll try it. Thank you!
