Gateway scripts stop running FTP

I have a series of scripts in the gateway that at som point stop. As pointed in Gateway Timer scripts mysteriously stopped it is very likely it is due to a ftp socket that doesnt respond and so the system is stuck (most of these scripts are to connecto to ftp ). Is there any way or a workaround to specify the timeout time in ignition? The ftp lib included in this version of jython apparently doesnt include option yet.

Thanks in advance !

Consider using native Java’s java.net.URL and java.net.URLConnection instead of the python lib.

1 Like

Thanks for the answer pturmel, thats the kind of tools i was looking for !

Hi,
I have written insert query with hard coded values in gateway event script - I have scheduled itto run for every 15 mins.
It is inserting but not able to stop.

how to stop the script which is running

Thank you

By "scheduled to run", do you mean you started a script that loops forever? If so, you'll have to restart your gateway to kill it.

Use Ignition's events to run your script. Don't loop in the script. Just do the one insert. Let Ignition call the script every fifteen minutes.

If you must run a long-lived script, you must take special precautions to ensure it dies when you ask it to, and can be replaced when you update the code.