I am trying to run a cron job with Firebase. Basically I need to run a function that makes a ton of API calls and pushes data to firebase at 12:00am PST every day. Is there
At I/O 2019 it was announced a new feature to do cronjobs with firebase functions.
Check it out
export scheduledFunction = functions.pubsub.schedule(‘every 5 minutes’).onRun((context) => {
console.log(‘This will be run every 5 minutes!’);
});
exports.scheduleJobs = functions.pubsub.
schedule(“every day 03:00”).onRun(async() => {
// do something
console.log(“All done! See you tomorrow morning!”);
});