背景:人老了記性很差,總是週五的時候忘寫週報,痛定思痛下,準備弄個定時提醒.找來找去,也沒有合適的方案,最終無奈使用了cron.
特記錄下其設定方式,以備後邊使用. svg
編輯 文件/etc/crontab 添加如下內容
*/10 17 * * 5 root export DISPLAY=:0.0 && notify-send -i /usr/share/icons/Humanity/emblems/48/emblem-danger.svg 週五了,請及時提交週報 spa
以上內容意思是每週五17點後,每隔10分鐘就會發出消息提示.
而後 執行命令sudo service cron restart 重啓便可 rest