Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

76
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda