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

139
Visualizações
I want to add a old document to a new collection on a specific date

I am extracting a document from a collection called 'Users'. Then I want to push the document with some updations to a collection 'pending'.

The Invoke a cloud function every day and get data from my users' collection. Every document has a timestamp.

enter image description here

I check every day if the date is equal to the date on the server. if yes, then it executes the function for adding the data to the new collection pending.

How can I ensure if It will work correctly?

Thanks in advance!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

There are several approaches to ensure the code works correctly:

  1. Add test, you can add test for cloud function which can run locally or even against a real Firestore database. Check more details here: https://firebase.google.com/docs/functions/local-shell

  2. You can also monitor the logs from Firebase console for the scheduled function. Console -> Cloud Function -> log -> select the function name

  3. On the front-end, you can even add one more check to verify if the pending date in the expected time frame.

about 4 years ago · Juan Pablo Isaza Relatório
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