Nest Schedule

screenshot of Nest Schedule
nestjs

A cron-like and not-cron-like job distributed scheduler for Nest.js by decorators.

Overview

The Nest Schedule module is an efficient tool designed for managing scheduled jobs within applications built on the Nest framework. Its flexible architecture allows developers to create, manage, and execute cron jobs, interval jobs, and timeout jobs seamlessly, enhancing automations and task management.

This powerful module supports both distributed systems and dynamic configuration, making it a suitable choice for applications that require smooth operation without interrupting processes. By utilizing decorators and a straightforward API, the Nest Schedule module can significantly optimize job scheduling and execution, thus improving overall application performance.

Features

  • Dynamic Job Scheduling: Easily define and manage tasks that need to be executed on a recurring basis, suiting various application needs.

  • Distributed Support: Extend the NestDistributedSchedule class to facilitate job scheduling in distributed environments, enhancing coordination across platforms.

  • Configurable Job Properties: Customize job behavior with options like enable, maxRetry, and retryInterval to control execution and handling of failures.

  • Cron Job Scheduling: Set up cron jobs using the powerful cron expression syntax, allowing precise timing for when jobs should run.

  • Immediate Job Execution: Use the immediate configuration option to run specific jobs without waiting for scheduled triggers.

  • Callback Functionality: Each job can have a callback function that determines whether the job should be canceled, adding an extra layer of control and responsiveness.

  • Job Timeout Management: Set up jobs that will execute after a defined timeout period, helping manage tasks that require strict timing constraints.

  • Extended Job Information: Each job can be assigned a unique key, along with optional start and end times for better tracking and management.

nestjs
Nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.