Results 1 to 2 of 2
Hello all:
i did a script called MYSCRIPT like this:
Code:
echo "hello"
/usr/bin/notify-send "hello"
echo hello > /root/msg.txt
saved it in /root directory, applied chmod +x
So, if i ...
- 02-23-2010 #1Just Joined!
- Join Date
- Jan 2009
- Posts
- 12
crontab + libnotify
Hello all:
i did a script called MYSCRIPT like this:
saved it in /root directory, applied chmod +xCode:echo "hello" /usr/bin/notify-send "hello" echo hello > /root/msg.txt
So, if i type in a shell: ./MYSCRIPT, it nicely show me HELLO in the shell, and HELLO in a graphical popup
ok, now i create another script MYSCRIPTcron
saved it in /root directory, applied chmod +xCode:*/1 * * * * /root/MYSCRIPT
now, i added it: crontab -r; crontab MYSCRIPTcron; crontab -l
and i see it in the crontab list.
Everytime i check /root, i can see the file called msg.txt, if i delete it, it appears each minute, so crontab is working
BUT I CANT GET IT TO SHOW ME ANY NOTIFICACION
i also tryed with
what must i do to get a popup, or a shell message with that "hello" message?Code:*/1 * * * * DISPLAY=:0.0 /root/MYSCRIPT
- 02-24-2010 #2
Without checking things out too fully, the first thing that I think of is whether there could be some sort of error message.
Try changing the line to this:
Now all output from the command (including any error message) will go to the given log file. Let's start by seeing if there's any sort of X error message in that file.Code:*/1 * * * * DISPLAY=:0.0 /root/MYSCRIPT &>> /root/MYSCRIPT_log
DISTRO=Arch
Registered Linux User #388732


Reply With Quote