use this instruction for create scheduled instance, using gcloud https://cloud.google.com/scheduler/docs/start-and-stop-compute-engine-instances-on-a-schedule After created functions - instance is not started. error in cloud fucntion startInstancePubSub - TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object. | -- | --
Activity
jackson-lucas commentedon Jan 7, 2020
I was having the same problem, what I noticed is the cloud function code on the link is different from the code on Github.
The code on link make it seems there is
event.data.data, which is false. To fix I used the code from the link but withoutpubsubMessageconstant and passedevent.datadirectly toBuffer.from()like the code on github (https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/functions/scheduleinstance/index.js#L36).Hope it helps :)
fhinkel commentedon Jan 15, 2020
👋 @zhukovnv84 Thanks for raising the issue. Looks like our documentation got updated to use
event.dataand should be correct.