Search code examples
pythonpush-notificationautomatic-updates

Automate push notifier on Desktop-Python


I created a script with python that extracts a KPI from a database and compares it with another KPI, then I created a push notification that sent me a message on the desktop if the KPI of the database is out of its tolerance. My question is how can I automate this push notifier in my desktop? I mean every time the KPI changes I want to receive automatically a message from the notifier on the Desktop? Do you have any idea, please? Thank you :)


Solution

  • If you want to do that locally. I can think of 2 options.

    You need to create another function/script that detects if there is a change in the database. Then

    1. You have that script running in the background constantly. You can make it check for changes every minute or so. If there is a change, then it calls the script that you made. You can also make it being executed every time you turn on your PC

    2. Similar to before but with the use of a windows scheduler. That schedules can run the script every minute or so.