GIT will automatically create a Lua script file called global.lua which will contain nothing. This Lua script file will run automatically during the Syncing of Switches and Selectors stage once an aircraft's virtual cockpit has loaded.
global.lua is shared across all aircraft and must only contain code that is relevant for all aircraft e.g. setting global variables for use across all Lua scripts.
global.lua runs on its own thread so can be coded to loop continuously. Remember to add a sleep statement if looping the code so that the thread does not hog all the CPU time e.g. sleep(100).