Node JS

Learn how to publish a job with NodeJS Library

Prerequisites

To get the most out of this guide, you’ll need to:

Authentication

Install

Get the NextCron Node.js SDK.

yarn add nextcron

Publish a Job

Start by send a job

import { NextCron } from 'nextcron';

const nextcron = new NextCron('YOUR_API_KEY')

await nextcron.publish({
    topic: 'send-welcome-email',
    target: 'http://localhost:3000/jobs/send-welcome-email',
    method: 'POST',
    data: { name, email },
})

Last updated