Cron with notify-send

前端 未结 13 1223
我寻月下人不归
我寻月下人不归 2020-12-09 10:06

I need to show a notification from a cron job. My crontab is something like:

$ crontab -l
# m h  dom mon dow   command
  * *   *   *   *    Display=:0.0 /usr         


        
13条回答
  •  既然无缘
    2020-12-09 10:10

    May be you can try:

    * * * * * env DISPLAY=:0.0 sudo -u ravi /usr/bin/notify-send Hey "How are you"

提交回复
热议问题