# Switch Screen at Certain Time

**URL:** <https://forum.inductiveautomation.com/t/switch-screen-at-certain-time/40247>\
**Category:** Ignition\
**Created:** [November 3, 2020, 5:13pm UTC](https://forum.inductiveautomation.com/t/switch-screen-at-certain-time/40247 "2020-11-03T17:13:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tre99ahs](https://avatars.discourse-cdn.com/v4/letter/t/858c86/32.png) [@tre99ahs](https://forum.inductiveautomation.com/u/tre99ahs)\
**Post date:** [November 3, 2020, 5:13pm UTC](https://forum.inductiveautomation.com/t/switch-screen-at-certain-time/40247/1 "2020-11-03T17:13:17Z")

</div>

I would like to switch to a default window at 12 am everyday no matter what window the client is currently in, what would my script need to look like?

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [November 3, 2020, 5:19pm UTC](https://forum.inductiveautomation.com/t/switch-screen-at-certain-time/40247/2 "2020-11-03T17:19:33Z")

</div>

Welcome to the forums.

This will open your window:

```auto
system.nav.openWindow('path/to/window')

```

I would personally use a Client Tag Change script for the trigger.  
and the trigger tag would be an expression tag that goes high everyday at 12 am. (using **dateExtract()**)

---

<div class="post-metadata">

**Author:** ![tre99ahs](https://avatars.discourse-cdn.com/v4/letter/t/858c86/32.png) [@tre99ahs](https://forum.inductiveautomation.com/u/tre99ahs)\
**Post date:** [November 3, 2020, 5:31pm UTC](https://forum.inductiveautomation.com/t/switch-screen-at-certain-time/40247/3 "2020-11-03T17:31:06Z")

</div>

any idea what that would completely look like sorry im learning

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [November 3, 2020, 5:49pm UTC](https://forum.inductiveautomation.com/t/switch-screen-at-certain-time/40247/4 "2020-11-03T17:49:18Z")

</div>

**Create your Trigger:**  
DateExtract: [dateExtract - Ignition User Manual 8.0 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC80/dateExtract)  
your tag would be an expression tag (Boolean) with the following:

```auto
dateExtract(now(), 'hour') = 0 // boolean tag will be True everyday @ 12am.

```

**Add trigger** to Client Tag Event scripts (this link is for gateway Tag Events but the same applies for Clients):  
[https://docs.inductiveautomation.com/display/DOC80/Gateway+Event+Scripts#GatewayEventScripts-TagChangeScripts](https://docs.inductiveautomation.com/display/DOC80/Gateway+Event+Scripts#GatewayEventScripts-TagChangeScripts)

**Add the following script** to the Client Tag Event Scripts _Script_ tab:

```auto
system.nav.openWindow('path/to/window')

```

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