Esri Technical Support has an article with respect to running python scripts using the 'relative' path that contains the ArcCatalog connection name (i.e 'Database Connections/MyDatabaseName.sde/), outside of an ArcGIS Environment.
For example, running from Windows Command Prompt, or Task Scheduler.
FAQ: Why am I getting "Error 000732, < dataset name > does not exist or is not supported", in a script run outside the ArcGIS environment?
as long as you specify the python installation that comes with the ArcGIS install
(C:\Python27\ArcGIS10.4\python.exe python), and
also the the sde connection file is stored in the 'Database Connections/MyDatabaseName.sde/ directory (aka the user profile in which the process will be run: C:\Users\<userName>\AppData\Roaming\Esri\Desktop10.4\ArcCatalog), the script will run.
This is because that python install is technically part of the ArcGIS Environment.