I would appreciate any help I'm trying to run a cron which --- executes python script - that opens a terminal window and runs python script. It's a websocket script that I need to be able to monitor the out in the window.
Everything works fine when I run from a terminal window or from the pycharm emulator. But, when I run this from a cron - it errors
Unable to init server: Could not connect: Connection refused
Failed to parse arguments: Cannot open display:
import os
path = '/home/bob/scripts/'
os.chdir(path)
os.system("gnome-terminal -- python /home/bob/scripts/test.py & ")
I'm running Ubuntu 20.04 and webmin to create the cron. All other crons work fine.