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

149
Views
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 answers
Answer question

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 Report
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!