# Automatically Printing a trend at Midnight

**URL:** <https://forum.inductiveautomation.com/t/automatically-printing-a-trend-at-midnight/8596>\
**Category:** Ignition\
**Created:** [June 20, 2014, 2:24pm UTC](https://forum.inductiveautomation.com/t/automatically-printing-a-trend-at-midnight/8596 "2014-06-20T14:24:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dfenter](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@dfenter](https://forum.inductiveautomation.com/u/dfenter)\
**Post date:** [June 20, 2014, 2:24pm UTC](https://forum.inductiveautomation.com/t/automatically-printing-a-trend-at-midnight/8596/1 "2014-06-20T14:24:38Z")

</div>

I am trying to get a trend to automatically print at midnight. I would like to set this up as a gateway script so that the HMI does not have open to the window every night at midnight.

I tried to setup the gateway script to automatically print, but apparently the gateway scripts are not user interactive, and I am unable to get it working.

Is there any way to setup a gateway script to open a window, then automatically print out a trend on a midnight trigger?

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [June 20, 2014, 2:43pm UTC](https://forum.inductiveautomation.com/t/automatically-printing-a-trend-at-midnight/8596/2 "2014-06-20T14:43:16Z")

</div>

the only way you will be able to do this is with a client and a client script.

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [June 20, 2014, 10:55pm UTC](https://forum.inductiveautomation.com/t/automatically-printing-a-trend-at-midnight/8596/3 "2014-06-20T22:55:08Z")

</div>

Just as diat150 said, you will need to have an open client and a client timer or tag change script to do this.

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [June 23, 2014, 5:54am UTC](https://forum.inductiveautomation.com/t/automatically-printing-a-trend-at-midnight/8596/4 "2014-06-23T05:54:57Z")

</div>

Why not have the gateway open a new client every day at midnight, have it load and print the trend, then close the client?
