Crontab Won't Run xdotool

198 views Asked by At

So, I wrote a simple script that only runs the xdotool. All it does is hit the escape key, or the hex for the escape key which is 0xff1b. However, the crontab isn't executing it for some reason. I ran the script in the terminal and it works exactly how I want it to, but crontabs just can't seem to run it. I did set the permissions to chmod u+x, just as a disclaimer. Here is my script:

#!/bin/bash

sleep 3
xdotool key 0xff1b
touch /writable/misc/desktop/ranscript.txt

crontab:

* * * * *      root /writable/misc/desktop/killWindow.sh
1

There are 1 answers

0
Mustafa Jawed On

Try this:

* * * * * bash /writable/misc/desktop/killWindow.sh