【发布时间】:2017-05-22 11:05:50
【问题描述】:
* * * * * export DISPLAY=:0.0 && usr/bin/notify-send "Hello world!"
我将上述命令添加到 crontab 中,notify-send 是从终端工作,但不是从 cron。还检查了日志,它每分钟都在工作,但没有显示通知。
【问题讨论】:
标签: notifications cron ubuntu-14.04 crontab
* * * * * export DISPLAY=:0.0 && usr/bin/notify-send "Hello world!"
我将上述命令添加到 crontab 中,notify-send 是从终端工作,但不是从 cron。还检查了日志,它每分钟都在工作,但没有显示通知。
【问题讨论】:
标签: notifications cron ubuntu-14.04 crontab
不知道为什么,但这有效。而是直接调用 notify-send 将其添加到脚本中。
* * * * * export DISPLAY=:0.0 && /bin/sh /home/notifyCustom.sh
【讨论】: