Python Forum
tkinter and crontab - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Forum & Off Topic (https://python-forum.io/forum-23.html)
+--- Forum: Bar (https://python-forum.io/forum-27.html)
+--- Thread: tkinter and crontab (/thread-43393.html)



tkinter and crontab - menator01 - Oct-16-2024

Just wondering if anyone has gotten a tkinter app to run from crontab?
My goal is to get the Bubble app to run from crontab
I'm using Ubuntu 24.04.1 LTS

I've tried several different ways and none seem to work.
I've tried using a bash script and tried running straight from crontab.
You can get the python code from my post here

bash script note: I subbed user for my name
Output:
export XAUTHORITY=/home/user/.Xauthority export DISPLAY=unix$DISPLAY nohup /usr/bin/python3 >/dev/null 2>&1 /home/user/Desktop/test/popup.py



RE: tkinter and crontab - menator01 - Oct-16-2024

I got it to work
In the crontab used
* * * * * DISPLAY=:1 /path/popup.py
You can get the display by doing echo $DISPLAY in the terminal.
Now to figure out how to do a list to execute multiple bubbles while only having one crontab entry.
On second thought, if having multiple bubbles at different times, that will require multiple crontab entries.

Any thoughts are welcome.