<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/scheduling-cloud-functions-for-firebase-cron--uxtcixzf5" -->

---
title: Scheduling Cloud Functions for Firebase (cron) | daily.dev
description: Firebase now offers a built-in way to schedule Cloud Functions using cron syntax or plain English schedules, built on top of Google Cloud Scheduler and...
canonical: https://daily.dev/posts/scheduling-cloud-functions-for-firebase-cron--uxtcixzf5
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Scheduling Cloud Functions for Firebase (cron) | daily.dev
og:description: Firebase now offers a built-in way to schedule Cloud Functions using cron syntax or plain English schedules, built on top of Google Cloud Scheduler and...
og:url: https://daily.dev/posts/scheduling-cloud-functions-for-firebase-cron--uxtcixzf5
og:image: https://api.daily.dev/og/posts/uxtcIxZF5.png
og:image:alt: Scheduling Cloud Functions for Firebase (cron)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Scheduling Cloud Functions for Firebase (cron)

**[Firebase](https://daily.dev/sources/firebase-blog)** · 2 min read · 0 upvotes · 0 comments

## Summary

Firebase now offers a built-in way to schedule Cloud Functions using cron syntax or plain English schedules, built on top of Google Cloud Scheduler and Pub/Sub. This requires firebase-functions SDK version 2.3.0 and Firebase CLI 6.7.0 or later. The new pubsub.schedule() API automatically configures the underlying Cloud Scheduler job and Pub/Sub topic, removing the need to manually set up an HTTP endpoint (which was insecure since the URL was publicly accessible) or manage Pub/Sub messages directly. The feature requires the Blaze billing plan; each Cloud Scheduler job costs $0.10/month with three free jobs per Google account.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://firebase.blog/posts/2019/04/schedule-cloud-functions-firebase-cron>

## Questions this post answers

### How do I schedule a Cloud Function for Firebase to run on a cron schedule?

Use the functions.pubsub.schedule() method available starting in firebase-functions SDK version 2.3.0 with Firebase CLI 6.7.0 or later. Pass a standard cron string like '5 11 * * *' or a plain English schedule like 'every 5 minutes' to schedule(), then chain .onRun() with your callback function. This automatically provisions the underlying Cloud Scheduler job and Pub/Sub topic for you.

_daily.dev surfaces practical Firebase and Cloud Functions guidance for developers automating recurring backend tasks._

### How much does a scheduled Cloud Scheduler job cost for Firebase Cloud Functions?

Each Cloud Scheduler job costs $0.10 USD per month, with an allowance of three free jobs per Google account. Using scheduled functions also requires the project to be on the Blaze pay-as-you-go plan since Cloud Scheduler and Pub/Sub need billing information enabled, on top of normal Cloud Functions charges.

_Developers budgeting serverless infrastructure costs can track pricing changes like this via daily.dev._

### Why shouldn't I use an HTTP-triggered function with an external scheduler for cron jobs?

Because the HTTP endpoint URL used to trigger the function is effectively public and accessible to anyone who discovers it, making it insecure for scheduled invocation. Manually sending messages to a Cloud Pub/Sub endpoint as an alternative also proved difficult to manage, which is why a dedicated Pub/Sub-based scheduling function was introduced.

_daily.dev helps backend engineers stay current on secure patterns for scheduling serverless workloads._

## Similar posts on daily.dev

- [How to Use Dart Cloud Functions and the Firebase Admin SDK: A Handbook for Developers](https://daily.dev/posts/how-to-use-dart-cloud-functions-and-the-firebase-admin-sdk-a-handbook-for-developers-ailkvowjb) · freeCodeCamp · 2 upvotes · 0 comments
- [Optimize your Firebase Remote Config usage](https://daily.dev/posts/optimize-your-firebase-remote-config-usage-woddfd7ym) · Firebase · 1 upvotes · 1 comments
- [Drain Payload’s Schedule Queue on Serverless, End to End](https://daily.dev/posts/drain-payload-s-schedule-queue-on-serverless-end-to-end-fvn0xqsmt) · Medium · 0 upvotes · 0 comments
- [Cloudflare Cron Triggers: run a Worker on a schedule](https://daily.dev/posts/cloudflare-cron-triggers-run-a-worker-on-a-schedule-allyxbppi) · Flavio Copes · 0 upvotes · 0 comments

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#gcp](https://daily.dev/tags/gcp), [#serverless](https://daily.dev/tags/serverless), [#firebase](https://daily.dev/tags/firebase)

[View this post on daily.dev](https://daily.dev/posts/scheduling-cloud-functions-for-firebase-cron--uxtcixzf5)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Scheduling Cloud Functions for Firebase (cron)","url":"https://daily.dev/posts/scheduling-cloud-functions-for-firebase-cron--uxtcixzf5","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/scheduling-cloud-functions-for-firebase-cron--uxtcixzf5"},"datePublished":"2026-08-23T12:19:05.486Z","dateModified":"2026-08-23T12:24:35.245Z","description":"Firebase now offers a built-in way to schedule Cloud Functions using cron syntax or plain English schedules, built on top of Google Cloud Scheduler and...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7ed721de96163685d26ab7e314be3ebc?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7ed721de96163685d26ab7e314be3ebc?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Firebase","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Firebase","logo":"https://media.daily.dev/image/upload/s--i395oqZH--/f_auto,q_auto/v1787487448/logos/firebase-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/firebase-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/scheduling-cloud-functions-for-firebase-cron--uxtcixzf5","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"general-programming,gcp,serverless,firebase","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Firebase","item":"https://daily.dev/sources/firebase-blog"},{"@type":"ListItem","position":3,"name":"Scheduling Cloud Functions for Firebase (cron)"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/scheduling-cloud-functions-for-firebase-cron--uxtcixzf5#faq","mainEntity":[{"@type":"Question","name":"How do I schedule a Cloud Function for Firebase to run on a cron schedule?","acceptedAnswer":{"@type":"Answer","text":"Use the functions.pubsub.schedule() method available starting in firebase-functions SDK version 2.3.0 with Firebase CLI 6.7.0 or later. Pass a standard cron string like '5 11 * * *' or a plain English schedule like 'every 5 minutes' to schedule(), then chain .onRun() with your callback function. This automatically provisions the underlying Cloud Scheduler job and Pub/Sub topic for you. daily.dev surfaces practical Firebase and Cloud Functions guidance for developers automating recurring backend tasks."}},{"@type":"Question","name":"How much does a scheduled Cloud Scheduler job cost for Firebase Cloud Functions?","acceptedAnswer":{"@type":"Answer","text":"Each Cloud Scheduler job costs $0.10 USD per month, with an allowance of three free jobs per Google account. Using scheduled functions also requires the project to be on the Blaze pay-as-you-go plan since Cloud Scheduler and Pub/Sub need billing information enabled, on top of normal Cloud Functions charges. Developers budgeting serverless infrastructure costs can track pricing changes like this via daily.dev."}},{"@type":"Question","name":"Why shouldn't I use an HTTP-triggered function with an external scheduler for cron jobs?","acceptedAnswer":{"@type":"Answer","text":"Because the HTTP endpoint URL used to trigger the function is effectively public and accessible to anyone who discovers it, making it insecure for scheduled invocation. Manually sending messages to a Cloud Pub/Sub endpoint as an alternative also proved difficult to manage, which is why a dedicated Pub/Sub-based scheduling function was introduced. daily.dev helps backend engineers stay current on secure patterns for scheduling serverless workloads."}}]}
```

