I'm trying to do a task schedule in linux to run a sh
file, however, it does not run by crontab
, but it does when done in the hand.
I did a scheduling test to create a text file, it works, but to run sh
does not.
Here are the settings:
/ etc / crontab settings:
*/1 * * * * root /home/user/selamat.sh
I've tried this:
*/1 * * * * root sh /home/user/selamat.sh
And so:
*/1 * * * * root (cd/home/user/ && ./selamat.sh >> Script.log 2>&1)
The shell script settings:
#!/bin/bash
zenity --info --text "SELAMAT";
This script opens a popup.