We're excited to announce the release of our official NextCron JavaScript/TypeScript SDK! This new SDK simplifies the process of integrating NextCron's task scheduling capabilities into your JavaScript or TypeScript applications.
Streamlining Task Scheduling with the NextCron SDK
The NextCron SDK provides a straightforward and intuitive way to publish and manage your tasks. Here's a quick example to get you started:
import { NextCron } from 'nextcron';
const nextcron = new NextCron('your-api-key-here');
await nextcron.publish({
"topic": "scheduled-email",
"target": "http://localhost:3000/api/send-email",
"method": "POST",
"data": {
"email": "[email protected]",
"subject": "Scheduled Email",
"message": "This is a scheduled email from NextCron."
},
"opts": {
"delay": 3000
}
});
This SDK not only simplifies the code you need to write but also enhances the reliability and readability of your task scheduling implementations.
Getting Started
To start using the NextCron SDK in your projects, simply install it via npm:
npm install nextcron
For more detailed information on how to use the SDK, including advanced features and customization options, visit our documentation.
Embrace the power of NextCron in your JavaScript or TypeScript projects with ease. We can't wait to see what you'll build with this new tool in your arsenal!