mashlol / notify

Notify your devices from the terminal
https://mashlol.github.io/notify/
261 stars 38 forks source link

Execution from crontab #30

Closed Project-42 closed 6 years ago

Project-42 commented 6 years ago

Hi, sorry if Im opening an issue for something is probably my lack of linux understanding... Im trying to use notify to send me a script's result using cron. Im able to execute notify from command line, but if I execute it from crontab, is not working:

I tried like this: crontab content:

19 08 /home/solifugo/notify_test.sh 22 08 /usr/local/bin/notify -t "test2"

none of them are working executed by cron, but they are both fine if I do it from command line.

raspi: cat /home/solifugo/notify_test.sh

!/bin/bash

/usr/local/bin/notify -t "test" raspi:

I read something about Node script execution, but not sure if that applies here.

Anyway, hope someone can guide me.

Btw, the app is very nice. Simple and exactly what I really need (once I get crontab script working.. :P )

beemill commented 6 years ago

looks like there's bash version of this script: https://github.com/mashlol/notify/blob/master/sh/notify.sh

curl "https://us-central1-notify-b7652.cloudfunctions.net/sendNotification?to=${KEY}&text=${TEXT}"

Project-42 commented 6 years ago

Thank you! 😊 , that is a valid solution for my case.