How to create cron tasks in Firebase

A few days ago, I was wondering how to call a function programmatically using Firebase Cloud Functions.

Firebase team introduced chron jobs on April 18, 2019. The problem is that Cloud Scheduler needs billing information and each Cloud Scheduler job costs $0.10 (USD) per month.

If you don't want to give your billing data, there is a method to create simple cron tasks for free.

Google Drive Spreadsheet

  1. Go to Google Drive and create a new spreadsheet
  2. On the top menu, click on Tools > Script Editor
  3. Write this function
function chronJob(){
  // Defining the target URL
  var url = "CLOUD_FUNCTIONS_URL";
  // Fetching the URL
  var response = UrlFetchApp.fetch(url);

Full screen code block

  1. Save the file and click on the timer button

Timer button

  1. Add new trigger


  1. Select Time-driven trigger

![Time driven trigger] (

  1. Choose the frequency to call the function (monthly, weekly, daily, etc.)

Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.