Serverless Framework CRON JOB Scheduler Offline Local Testing Node JS

Onexlab
3 min readNov 15, 2020

In this article, We will discuss how we can test Serverless Framework CRON Job Scheduler Offline or Local using a Node JS.

Sometimes you need to test functionality locally on your system for instance you have Serverless Function (AWS lambda) that schedule to execute every 30 minutes to perform any X or Y task. So the question is how do you test it locally before deploying to the AWS environment?

We will teach you don’t worry :) there are many benefits of testing locally before deploying to the AWS environment such as

  1. Save Cost
  2. Save Time
  3. Test Performance Locally

Video

Let’s Start

What is CRON JOB Scheduler?

A task that executes in the background on a particular or defined date/time called CRON JOB

Example:

You have the task or function to check the user's birthday every 24 hrs from the database and…

--

--