Cron with notify-send

前端 未结 13 1215
我寻月下人不归
我寻月下人不归 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:29

    Try this when you call notify-send in your script:

    echo "PASSWORD" | sudo -u USER notify-send "your alert message"

提交回复
热议问题