# Re-Targetting Error

**URL:** <https://forum.inductiveautomation.com/t/re-targetting-error/14224>\
**Category:** Ignition\
**Created:** [May 5, 2017, 3:41pm UTC](https://forum.inductiveautomation.com/t/re-targetting-error/14224 "2017-05-05T15:41:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TruThat](https://avatars.discourse-cdn.com/v4/letter/t/ea666f/32.png) [@TruThat](https://forum.inductiveautomation.com/u/TruThat)\
**Post date:** [May 5, 2017, 3:41pm UTC](https://forum.inductiveautomation.com/t/re-targetting-error/14224/1 "2017-05-05T15:41:03Z")

</div>

I have several TVs that have there own App running on the. Once an hour I want to retarget them to another project for 3 minutes and then have them return to their original app. I have the smarts to do the time but getting an error when I test with a button script.

I am using 7.9.2 Ignition.

system.util.retarget(“Copy\_Of\_Hallway”,“192.168.59.240:8088”, {“retargetOccured”:1}, [“Safety”])

I want this to invoke from a Timer Client Script when Finish and Return from a Client Script from the retargeted project

This is the Error  
Error Launching application  
SAXParseException: The element type “link” must be terminated by the matching end-tag “”.

---

<div class="post-metadata">

**Author:** ![TruThat](https://avatars.discourse-cdn.com/v4/letter/t/ea666f/32.png) [@TruThat](https://forum.inductiveautomation.com/u/TruThat)\
**Post date:** [May 5, 2017, 3:53pm UTC](https://forum.inductiveautomation.com/t/re-targetting-error/14224/2 "2017-05-05T15:53:35Z")

</div>

> [@TruThat](#):
>
> AXParseException: The element type "link" must be terminated by the matching end-tag ""

This fix this issue  
system.util.retarget("Copy\_Of\_Hallway","192.168.59.240:8088:8043/main", {"retargetOccured":1}, ["Safety"])

---

<div class="post-metadata">

**Author:** ![TruThat](https://avatars.discourse-cdn.com/v4/letter/t/ea666f/32.png) [@TruThat](https://forum.inductiveautomation.com/u/TruThat)\
**Post date:** [May 6, 2017, 11:11pm UTC](https://forum.inductiveautomation.com/t/re-targetting-error/14224/3 "2017-05-06T23:11:04Z")

</div>

**Code I used to change project and then back after set time.**

# Get Current Min and convert it to INT

today = system.date.now()  
Min = system.date.format(today, “mm”)

#Get Time to Show Hallway Project  
tagread = system.tag.read(“SLI/Charlotte/Bakery/TVs/Hallway/Line 3 TV Time”)  
switchtime = tagread.value  
iMin = int(Min)

#Goto Hallway Project  
if iMin == switchtime:  
Dest = system.tag.read(“SLI/Charlotte/Bakery/TVs/Hallway/HallWayTVName”)  
system.util.retarget(Dest.value,“192.168.59.240:8088:8043/main”, {“retargetOccured”:1}, [“Safety”])

**Dest Code**

```auto
#get Min and conv to INT
today = system.date.now()
Min = system.date.format(today, "mm")
imin =int(Min)
#get variables 
project = system.util.getGlobals()['_RETARGET_FROM_PROJECT']
gateway = system.util.getGlobals()['_RETARGET_FROM_GATEWAY']
ChkTV = project[-2:]

returntime = system.tag.read("SLI/Charlotte/Bakery/TVs/Hallway/Line 3 TV Time Ret")
#if called from another project check return time and then call original project.
if ChkTV == "TV":	
	returntime = system.tag.read("SLI/Charlotte/Bakery/TVs/Hallway/" + project) 	
	if returntime.value == imin:
		system.util.retarget(project,"192.168.59.240:8088:8043/main", {"retargetOccured":1},["Safety"])

```
