Hi all i am working on a project where i have built a function that will query a Database at a particular time of a day using APS Scheduler. so whenever my query output
matches a particular value i want to send a notifications to all my users informing them of a event how can i achieve this
What sort of “notifications” are you looking to send? Are you talking about sending emails here? Or something else?
You could write your script as a custom management command and have the scheduler run it when necessary.
Or, if you’re already using celery in your project, you could schedule the task using Celery Beat instead of APS.
Or, if the only reason you’re using APS is to run this task, you could also set this up as a cron job instead of an APS task.
Hi Ken ,
I am looking for a web based notification where users will have a notification icon which will show their notifications other alternative is desktop notifications where my website can send notifications to windows and it will show as a desktop notification.
i am already using a cronjob with aps to do my task
My Scheduling part is solved , i bult a scheduler that is designed to query my DB.now I need a notification system that informs my users. when a DB value is matching with a specefic condition.
Eg: if my DB column value is completed i want users to get notified that The Task has been completed
Ok, so you’re talking about needing to support Websockets. (Or SSE, which really are effectively just a lightweight, limited use websocket.) In the Django world, this means Channels.
Or, you can integrate some other “Push notification” scheme into your environment.
Or, for desktop apps, you can implement a polling process that checks your site every “n” seconds for an update. Or, that app could open a persistent network connection to your server.
The point here is that base Django is not capable of doing this. You will need some other server, service, or client software to implement it.