On the way to batch run my data collecting.
Plan is to schedule a .py script (
which of course contains
import refinitiv.data as rd
)
For the API to work, the desktop app needs to run, no other way I am told.
Hence, how can i start the app from a python script?
Saves me a Task Scheduler entry ... Task Scheduler being ... temperamental?
Here is a try that doesn't err our but doesn't start it either. Workspace needs to run as admin.
import os
import subprocess
app_path = r'C:\...AppData\Local\Refinitiv\Refinitiv Workspace'
command = f'runas /user:administrator "{app_path}"'
try:
os.system(command)
except Exception as e:
print(f"An error occurred: {e}")