I have a callable firebase cloud function that throws
when it's called without any data.
/functions/index.js
export.someCallableFunction = functions.https.onCall(someCallableFunction);
I want to set up a Cloud Scheduler to ping it and avoid cold starts, whenever possible (I know it's not 100% guaranteed to avoid cold starts).
From: https://console.cloud.google.com/cloudscheduler/jobs
Can I do this with callable functions? How can I pass data to them?
Will I need to create a regular HTTP
request function to schedule calls to it first, and then make it call the callable
?
If you want to invoke a callable function without the client library, you will have to follow its protocol specification. Basically, you are going to have to POST to it with a JSON payload. It's up to you to figure out how to get both the function and scheduler to agree on something that doesn't throw an exception.
It's entirely possible that Cloud Scheduler simply doesn't allow enough configuration to support the minimum required headers required by callables. In that case, you'll have to use something other than Cloud Scheduler to invoke the function.