# Writing tags to Historian at selected times during the day

**URL:** <https://forum.inductiveautomation.com/t/writing-tags-to-historian-at-selected-times-during-the-day/22376>\
**Category:** Ignition\
**Tags:** database\
**Created:** [February 6, 2019, 1:43pm UTC](https://forum.inductiveautomation.com/t/writing-tags-to-historian-at-selected-times-during-the-day/22376 "2019-02-06T13:43:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruce.gitlin](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@bruce.gitlin](https://forum.inductiveautomation.com/u/bruce.gitlin)\
**Post date:** [February 6, 2019, 1:43pm UTC](https://forum.inductiveautomation.com/t/writing-tags-to-historian-at-selected-times-during-the-day/22376/1 "2019-02-06T13:43:44Z")

</div>

I would like to write tag values to Historian at selected times during the day. I am new to Ignition and have not been able to find anything on the topic.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [February 6, 2019, 3:52pm UTC](https://forum.inductiveautomation.com/t/writing-tags-to-historian-at-selected-times-during-the-day/22376/2 "2019-02-06T15:52:37Z")

</div>

Easiest thing I know of to only record values into history at a selected time would be to do it manually with a script on a client tag using the system.tag.storeTagHistory function.

---

<div class="post-metadata">

**Author:** ![Caleb\_Bohon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/caleb_bohon/32/3293_2.png) [@Caleb\_Bohon](https://forum.inductiveautomation.com/u/Caleb_Bohon)\
**Post date:** [February 6, 2019, 8:09pm UTC](https://forum.inductiveautomation.com/t/writing-tags-to-historian-at-selected-times-during-the-day/22376/3 "2019-02-06T20:09:22Z")

</div>

I think you could be asking one of two things: 1) “I want to store tag values only during certain times of the day, for other times I do not want any information stored to the Historian.” 2) “I want tag information stored for all day, but I only want Ignition to store it to SQL during certain hours.”

For #1, then you probably want to check the SQL Bridge Module out:  
[https://docs.inductiveautomation.com/display/DOC79/SQL+Bridge+Module](https://docs.inductiveautomation.com/display/DOC79/SQL+Bridge+Module)  
Set up transactions to run to store your data only during the times you need.

For #2, then change your Store and Forward Settings:  
[https://docs.inductiveautomation.com/display/DOC79/Store+and+Forward](https://docs.inductiveautomation.com/display/DOC79/Store+and+Forward)  
make sure you make the cache and buffer sizes big enough to hold data from the parts of the day that you aren’t connecting in.
