this is what I’ve been looking at recently and have been using a modified version of the GitHub script
This grabs the env vars in use and sends them with the job which works great for maya / houdini with different versions of centrally installed plugins.
Seems to fail on C4D jobs though where the local user env vars get sent anyway and it trys to write temp stuff to the submission users folder which isn’t on the nodes.