# Run Perspective Component Custom Script Daily

**URL:** <https://forum.inductiveautomation.com/t/run-perspective-component-custom-script-daily/83819>\
**Category:** General Discussion\
**Tags:** perspective, scripting\
**Created:** [January 4, 2024, 10:36pm UTC](https://forum.inductiveautomation.com/t/run-perspective-component-custom-script-daily/83819 "2024-01-04T22:36:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pico\_Sankari](https://avatars.discourse-cdn.com/v4/letter/p/aeb1de/32.png) [@Pico\_Sankari](https://forum.inductiveautomation.com/u/Pico_Sankari)\
**Post date:** [January 4, 2024, 10:36pm UTC](https://forum.inductiveautomation.com/t/run-perspective-component-custom-script-daily/83819/1 "2024-01-04T22:36:27Z")

</div>

I have a custom script that fetches data for a XY chart. I would like this to run once daily. I know that there are a variety of events that can be configured, but none of them are timers. What is the simplest way to make this script run once per day?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 4, 2024, 10:43pm UTC](https://forum.inductiveautomation.com/t/run-perspective-component-custom-script-daily/83819/2 "2024-01-04T22:43:17Z")

</div>

You can't do that with Perspective as it won't run if no client is open and it might run more than once if multiple clients were open.

Instead the script has to be run in the gateway scope.

- Project Browser → Scripting → Project Library → Create a New Script.
- Project Browser → Scripting → Gateway Events (double-click) → Scheduled. Call the Project Library script created in the previous step.

[https://docs.inductiveautomation.com/display/DOC81/Gateway+Event+Scripts](https://docs.inductiveautomation.com/display/DOC81/Gateway+Event+Scripts)
