Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tkinter and crontab
#1
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
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts


Reply
#2
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.
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts


Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020