I want Crontab to run Python
script at specific time. That Python script opens the Terminal with "subprocess"
library and writes stuff with "Pyautogui" library. How to do that?
I studied Crontab
a little bit and made it work with my Bash script, which does something else. I learned that Crontab has some kind of limitations. I used DBUS_SESSION_BUS_ADDRESS to enable gsettings
but now, it's about opening a Terminal and writing stuff.
Crontab entry:00 15 * * * python3 /home/Admin/Desktop/shutdown_script.py
How to do that?
Goal: My goal is to shutdown my computer and other 19 computers at the same time at specific time, when I leave the place. I use CSSH to connect to other computers. My script does that and writes password and sudo shutdown now
to shut them down, all, at the same time.
EDIT: Python script
#!/usr/bin/python3
import pyautogui, time
pyautogui.hotkey("ctrlleft", "altleft", "t")
time.sleep(1)
pyautogui.write("Hello World!", interval=0.05)
Manually running it in Terminal = works; Trying to do that with Crontab = not working
BUMP: If it's impossible or no one knows, how to do that or has any ideas then I'll look for another way, maybe schedule stuff in Python with some Python library or.. idk.. find something (idea), that might accomplish this :D