DEV Community

Cover image for Day 11 - Quick Reminder Notification - 100 days 100 python scripts
Ganesh Raja
Ganesh Raja

Posted on

Day 11 - Quick Reminder Notification - 100 days 100 python scripts

Link to previous posts of the series

Day 11: notify_user

A one-line script that notifies the user with the given title and message. Could be helpful to remind your daily tasks with the help of cron or schedule module from python

import os,constants

# if you want the notification to be triggered at a specific time, user cron or schedule from python
# Though I prefer using Node-red for scheduling I am not gonna use other methods here.

os.system('notify-send "'+constants.NOTIFY_TITLE+'" "'+constants.NOTIFY_MESSAGE+'"')

Please Visit my Git Repo to check out all the previous day challenges.

https://github.com/ganeshraja10/automated-python-scripts

Discussion (0)