Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

134
Visualizações
firebase deploy to custom region for scheduled functions

I successfully managed to deploy my https.onCall() cloud functions on a specific server location with

functions.region("europe-west6")
.https.onCall((data, context) => ...

But when I tried to specify a location for scheduled function:

   exports.getItems = functions.pubsub.schedule('0 6 * * *')
  .region("europe-west6")
  .timeZone('Europe/Zurich')
  .onRun(async (context) => {

I receive:

TypeError: functions.pubsub.schedule(...).region is not a function

I wonder if this functionality (defining custom deploy region) is not available for scheduled functions...

(btw deploying the scheduled function worked without the .region() parameter)

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The .region() exists on imported functions SDK itself and not on the ScheduleBuilder returned by .schedule(), try this:

exports.getItems = functions.region("europe-west6")
  // after .region(''), similar to the HTTP function
  .pubsub.schedule('0 6 * * *')  
  .timeZone('Europe/Zurich')
  .onRun(async (context) => {

  })
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda