One thing to consider is that in some odd cases time.sleep
raises a java.lang.IllegalArgumentException
as experienced by me.
So for your script it would be something like this:
logger = system.util.getLogger("SF_GW_UpdateScript")
logger.info("Running git update!")
from java.lang import Thread
Thread.sleep(5000)
system.util.execute(["C:\Program Files\Inductive Automation\Ignition\data\git-auto-commit.bat"])
Reference: