Skip to main content
This guide will help you set up your first cloud-based scheduled job using the Schedo Node.js SDK.

Prerequisites

Before you begin, make sure you have:
  • A Schedo.dev account and API key
  • Node.js 16.x or later installed
  • A task you want to schedule (e.g., data processing, cleanup, notifications)

Installation

Install the Schedo.dev Node.js SDK using your preferred package manager:

Create Your First Job

Create a new file called jobs.ts (or jobs.js if you’re not using TypeScript):

Understanding the Code

Let’s break down the key components:
  1. SDK Initialization
    Connects your Node.js application to Schedo.dev’s cloud platform.
  2. Job Definition
    Defines a job that Schedo.dev will execute according to the schedule.
  3. Error Handling
    Schedo.dev provides built-in error handling;

Running Your Job

  1. Set your API key as an environment variable:
  2. Run your job file:
Your job is now running in the cloud! Schedo.dev will:
  • Execute it according to the schedule
  • Prevent duplicate runs
  • Provide logs and monitoring

TypeScript Support

The Schedo Node.js SDK is written in TypeScript and provides full type safety:

Next Steps

Job Concepts

Learn about job definitions and lifecycle

Error Handling

Implement robust error handling