Iām building a JavaScript(react native) application with firebase, and the idea is I want to write a function in firebase that makes a couple of API requests to an external api and then stores the data in Firestore, how ever I want this to happen once every 24 hours, or whenever some certain attributes in a specific users data (Users collection) changes so essentially this data rendered to the user changes every 24 hours, any tips on how I can approach this problem ?
Asked
Active
Viewed 515 times
0
-
Will this help? https://firebase.google.com/docs/functions/schedule-functions ā May 15 '22 at 10:28
-
thanks for the response, i will be sure to check it out ā Harold Obasi May 15 '22 at 12:15
1 Answers
1
exports.scheduledFunction = functions.pubsub.schedule('every 24 hours').onRun((context) => {
console.log('This will be run every 24 hours!');
return null;
});

Ajit Agarwal
- 123
- 8