# Delete Records at a certain time from a Transaction Group

**URL:** <https://forum.inductiveautomation.com/t/delete-records-at-a-certain-time-from-a-transaction-group/49773>\
**Category:** Ignition\
**Created:** [August 10, 2021, 6:24pm UTC](https://forum.inductiveautomation.com/t/delete-records-at-a-certain-time-from-a-transaction-group/49773 "2021-08-10T18:24:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brit](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Brit](https://forum.inductiveautomation.com/u/Brit)\
**Post date:** [August 10, 2021, 6:24pm UTC](https://forum.inductiveautomation.com/t/delete-records-at-a-certain-time-from-a-transaction-group/49773/1 "2021-08-10T18:24:58Z")

</div>

Hi, I’m working on a project that has a transaction group recording data. I have been using the built in “Delete Records older than…” but I’m trying to figure out how to delete records at 4:00 PM every day regardless of if data was recorded at 3:59 PM, 6:00 AM or whenever. Is there a way to do this? Please let me know!

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [August 10, 2021, 6:32pm UTC](https://forum.inductiveautomation.com/t/delete-records-at-a-certain-time-from-a-transaction-group/49773/2 "2021-08-10T18:32:16Z")

</div>

What version are you on?

---

<div class="post-metadata">

**Author:** ![Brit](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Brit](https://forum.inductiveautomation.com/u/Brit)\
**Post date:** [August 10, 2021, 6:46pm UTC](https://forum.inductiveautomation.com/t/delete-records-at-a-certain-time-from-a-transaction-group/49773/3 "2021-08-10T18:46:28Z")

</div>

8.0

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [August 10, 2021, 6:57pm UTC](https://forum.inductiveautomation.com/t/delete-records-at-a-certain-time-from-a-transaction-group/49773/4 "2021-08-10T18:57:09Z")

</div>

There is a few ways to do this. I think a newer version of 8.1 ( \>8.1.6) has [cronjob type functionality](https://docs.inductiveautomation.com/display/DOC81/Gateway+Event+Scripts#GatewayEventScripts-GatewayScheduledScripts). You can use another transaction group, use a boolean expression tag as a trigger to run your query. Another way is to use a gateway timer script that looks at the current time, then execute when “ready.” The full-version reporting module has it’s own cronjob setup and scripts can be run using scheduling regardless if it has an actual report of not.

---

<div class="post-metadata">

**Author:** ![Brit](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Brit](https://forum.inductiveautomation.com/u/Brit)\
**Post date:** [August 11, 2021, 4:50pm UTC](https://forum.inductiveautomation.com/t/delete-records-at-a-certain-time-from-a-transaction-group/49773/5 "2021-08-11T16:50:49Z")

</div>

To check for a current time, would I use system.date.now()?

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [August 11, 2021, 5:07pm UTC](https://forum.inductiveautomation.com/t/delete-records-at-a-certain-time-from-a-transaction-group/49773/6 "2021-08-11T17:07:45Z")

</div>

[Values pulled at certain times of day - Ignition - Inductive Automation Forum](https://forum.inductiveautomation.com/t/values-pulled-at-certain-times-of-day/21213)
