# Scheduling a Tag Change in Ignition

**URL:** <https://forum.inductiveautomation.com/t/scheduling-a-tag-change-in-ignition/91212>\
**Category:** Ignition\
**Created:** [May 31, 2024, 6:20pm UTC](https://forum.inductiveautomation.com/t/scheduling-a-tag-change-in-ignition/91212 "2024-05-31T18:20:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hakam\_Benlashher](https://avatars.discourse-cdn.com/v4/letter/h/8c91f0/32.png) [@Hakam\_Benlashher](https://forum.inductiveautomation.com/u/Hakam_Benlashher)\
**Post date:** [May 31, 2024, 6:20pm UTC](https://forum.inductiveautomation.com/t/scheduling-a-tag-change-in-ignition/91212/1 "2024-05-31T18:20:13Z")

</div>

I'm new to Ignition so please bear with me. I am currently trying to see if I can schedule a Tag change based on user input. My hope is to run a script that will change a tag value based on the date and time entered by the user. Is this possible and where do I start? Thank you in advance

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 31, 2024, 6:34pm UTC](https://forum.inductiveautomation.com/t/scheduling-a-tag-change-in-ignition/91212/2 "2024-05-31T18:34:36Z")

</div>

To restate your requirement:  
You want to present UI to the end user where they will enter a specific date and time, a tag path, and particular value.  
Then, when some date/time rolls around, you want their tag to be updated to the value specified?

---

<div class="post-metadata">

**Author:** ![Hakam\_Benlashher](https://avatars.discourse-cdn.com/v4/letter/h/8c91f0/32.png) [@Hakam\_Benlashher](https://forum.inductiveautomation.com/u/Hakam_Benlashher)\
**Post date:** [May 31, 2024, 6:50pm UTC](https://forum.inductiveautomation.com/t/scheduling-a-tag-change-in-ignition/91212/4 "2024-05-31T18:50:28Z")

</div>

Yes

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 31, 2024, 7:05pm UTC](https://forum.inductiveautomation.com/t/scheduling-a-tag-change-in-ignition/91212/5 "2024-05-31T19:05:41Z")

</div>

There's nothing built-in that will do this. But you can use a database table of incomplete tasks and a gateway timer event to implement this.

- Create a table that has a serial/autoincrement primary key, a "due" timestamp column, a tagpath column, and the desired value column.

- In a timer or scheduled event, run a query that retrieves all tasks that have due timestamp before `current_timestamp`.

- Loop through the result dataset, performing the tag write and then running a delete query on the incomplete tasks table.

- Set the interval or schedule for your event to something that gives you the precision you need, but not finer than that.

- In your user interface, you just have to insert the new task into the database.
