Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

68
Views
How to send notification when database date approaches expiration

I have a sqlalchemy model

class Service(db.Model):
__tablename__ = "service"

id = db.Column(db.String(10), db.ForeignKey('vehicle.id'), nullable=False, primary_key=True)
odometer = db.Column(db.Integer)
service_date = db.Column(db.DateTime)

And I'd like to send a notification to the front end through flask/javascript when one of the dates surpasses the current date. How do I check all the dates in a column and then execute a one time event for that particular date.

Edit: Ok so using a background scheduler like use BackgroundScheduler() from APScheduler to loop over the table and compare the dates was the best approach. Also creating a copy of the table purely for notifications so dates could be be removed or added as needed

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!