1

I use Firebase cloud functions and it has worked well so far.

However, my app has a new feature that requires setInterval.

More specifically, the feature consists of simulating geo-coordinates of a fleet of cars based on their direction and velocity which varies over time.

Every 5 seconds, I calculate the new coordinates and update the firebase real-time database.

I have already written the code using setInterval and it runs in NodeJs on my local machine. But I just discovered that Firebase will kill my code after 9 minutes.

What can I do ?

TSR
  • 12,583
  • 19
  • 64
  • 146

1 Answers1

-1

Why not have the client side update a trigger document every X minutes to keep the function firing?

Flignats
  • 1,164
  • 9
  • 19