I have a notify.sh
script that looks like:
notify-send "hi welcome"
My crontab notification for 2 PM:
0 14 * * * home/hacks/notify.sh
However, this doesn't work. What is the problem?
crontablinux
I have a notify.sh
script that looks like:
notify-send "hi welcome"
My crontab notification for 2 PM:
0 14 * * * home/hacks/notify.sh
However, this doesn't work. What is the problem?
Best Answer
Your script is missing a #! line at the start, which is the magic interpreted by the kernel to say which command interpreter is to be used for the script.
Make it look like this:
and make sure the script is executable:
Also, since you're asking for this to happen just once a day, is the timezone of the crontab the same as your own timezone? You might find this happening at 2pm GMT.