I'm looking to make a basic scheduled function for firebase, however I'm using the inline editor on Cloud Functions. For now I'm just testing the basic example they provided in the docs:
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
exports.scheduledFunctionCrontab = functions.pubsub.schedule('45 12 * * *').onRun((context) => {
console.log('This function was successful');
});
The part I am more confused about is what type of function do you use if your using the inline editor/ the console? (ie: HTTP, Pub Sub, Firestore ect.) to get this function running (in this example) 12:45 pm daily?
Thanks for the help or suggestions!
>>>Note: I'm aware that you can just manually make scheduled functions using the console, however this part of the application requires more flexibility and this syntax / method should work a lot better.
The inline editor in the Cloud Functions console isn't supported for editing functions that are defined by the firebase-functions
module, and deployed by the Firebase CLI. The Firebase CLI does extra work that the Cloud console doesn't simulate. If you want to use scheduled functions correctly, you have to deploy with the CLI.