Help in need to have an opinion about Scheduler -> Email notification
Hello,
I need help. Is there a way to modify or create function that will send an email if there is overdue record lets say 1 hour after the record is overdue? I tried creating a scheduler (cron) to run everyminute but it gets expensive and it will always call the database. Is there a way to just simply get all list of records and update the list if there's modified/created record and even i run it every minute atleast it will not just call direct from database?
9 Replies
In a short
yes
.
Provided by the little information you gave, like, which database you use, which OS you are referring to (assuming linux as you wrote cron
) and absolutly zero sourcecode to modify or work with.You could use a scheuling library like Quartz or Hangfire to schedule a Job every 30 mins or 1 hour, and then check from the db and send the email. If you want to go with the cron, the setup something like a console app which will run every 30 min or 1 hour.
Also If there are proper indexes on necessary fields the database operation won't be that expensive
is there a way not to call db every call? azure table storage? is that helpful @Alen Alex
Really depends upon your implementation, You haven't provided how you are doing it...
Also, honestly whats the issue in calling db?
It would be better if you actually provide code or some more info...
why are you averse to querying the database?
cause im looking at what if it will reach million of records
im using .net blazor then sql server
millions of records is no sweat for a database
and azure function for my api
If properly indexed 😁