Issue with Gateway Timer Script

I’m trying to automatically run the following code as a Gateway Timer Script, but it doesn’t work, nevertheless when I run it for example by pressing a button it works perfectly.

The Ignition versión I’m working with is 7.7.8

	source ="<key>")
	url= (url["datos"])
	datos=source =
#	print(t1,h1)

I removed the API key from your code sample - I don’t know if it’s particularly sensitive, but figured I’d err on the side of caution. That said, the issue with your script is this line:

When you write to tags from the gateway scope, you need to use fully qualified tag paths, because even if there is only one tag provider, the gateway doesn’t know which one is the “default” to use. Fully qualified paths have the tag provider name in square brackets as a prefix:

Thank you so much Paul. What a lapse :slight_smile:

Hi Paul,

I’ve tried with the full qualified path but it doesn’t work either when running as a Gateway script.

Check the logs in the gateway status page, and try adding “Import system” at the top of your script

Thank you, but adding import system hasn’t solved the issue. Please find ecnlosed the log, where I can’t see any thing related to this Gateway Script which I’ve (307.5 KB)

I have found the following in the log:

throwableInfot +Lorg/apache/log4j/spi/ThrowableInformation;xp gSet >com.inductiveautomation.ignition.common.script.TimerScriptTaskpppt Error executing global timer script: OFICINAS_ENGIE_MADRID/Temp_aemet @30,000ms . Repeat errors of this type will be logged as ‘debug’ messages.t binary-log-appendersr )org.apache.log4j.spi.ThrowableInformation¾þàrQ [ rept [Ljava/lang/String;xpur [Ljava.lang.String;­ÒVçé{G xp t "Traceback (most recent call last):t W File “<TimerScript:OFICINAS_ENGIE_MADRID/Temp_aemet @30,000ms >”, line 3, in t ÆIOError: PKIX path building failed: unable to find valid certification path to requested targett t 3 at org.python.core.Py.fromIOException( + at org.python.core.Py.IOError( v at com.inductiveautomation.ignition.common.script.builtin.AbstractNetUtilities.httpGet( @ at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)t Y at sun.reflect.DelegatingMethodAccessorImpl.invoke( 4 at java.lang.reflect.Method.invoke( N at { at com.inductiveautomation.ignition.common.script.ScriptManager$ 8 at 8 at _ at org.python.pycode._pyx170.f$0(<TimerScript:OFICINAS_ENGIE_MADRID/Temp_aemet @30,000ms >:25)t f at org.python.pycode._pyx170.call_function(<TimerScript:OFICINAS_ENGIE_MADRID/Temp_aemet @30,000ms >)t : at / at , at org.python.core.Py.runCode( at com.inductiveautomation.ignition.common.script.ScriptManager.runCode( at com.inductiveautomation.ignition.common.script.ScriptManager.runCode( _ at 2 at java.util.TimerThread.mainLoop( - at œ@px “ 3¼d ¬í sr !org.apache.log4j.spi.LoggingEventóò¹#tµ?