# 6am Insert to Database Method

**URL:** <https://forum.inductiveautomation.com/t/6am-insert-to-database-method/54277>\
**Category:** Ignition\
**Created:** [December 18, 2021, 11:18pm UTC](https://forum.inductiveautomation.com/t/6am-insert-to-database-method/54277 "2021-12-18T23:18:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wbaker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wbaker/32/85315_2.png) [@wbaker](https://forum.inductiveautomation.com/u/wbaker)\
**Post date:** [December 18, 2021, 11:18pm UTC](https://forum.inductiveautomation.com/t/6am-insert-to-database-method/54277/1 "2021-12-18T23:18:47Z")

</div>

Hey,

I’d like to insert data into a table at 6am each day. I know transaction groups would handle this just fine, but I’d like to take away the need to manually add new assets to a transaction group. Many times this can be forgotten and am looking for a method to use within a tag UDT.

Could a on change script looking for 6am provide the insert of a tags currentValue into the database?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 19, 2021, 12:13am UTC](https://forum.inductiveautomation.com/t/6am-insert-to-database-method/54277/2 "2021-12-19T00:13:13Z")

</div>

Sure if you’re careful, or better, a [scheduled script](https://docs.inductiveautomation.com/display/DOC81/Gateway+Event+Scripts#GatewayEventScripts-GatewayScheduledScripts) if you’re on 8.1.

---

<div class="post-metadata">

**Author:** ![wbaker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wbaker/32/85315_2.png) [@wbaker](https://forum.inductiveautomation.com/u/wbaker)\
**Post date:** [December 19, 2021, 2:00pm UTC](https://forum.inductiveautomation.com/t/6am-insert-to-database-method/54277/3 "2021-12-19T14:00:32Z")

</div>

Thank you Kevin! We are on 8.1, so I’ll check out the link.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 19, 2021, 2:03pm UTC](https://forum.inductiveautomation.com/t/6am-insert-to-database-method/54277/4 "2021-12-19T14:03:06Z")

</div>

It doesn’t meet the “part of a tag/UDT” criteria but it’s going to be the easiest to get working.

---

<div class="post-metadata">

**Author:** ![wbaker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wbaker/32/85315_2.png) [@wbaker](https://forum.inductiveautomation.com/u/wbaker)\
**Post date:** [December 19, 2021, 3:39pm UTC](https://forum.inductiveautomation.com/t/6am-insert-to-database-method/54277/5 "2021-12-19T15:39:26Z")

</div>

Yeah, it appears similar to transaction groups but with more flexibility.
