jobs-abstract
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Job Abstract

Schedule jobs in Node.

Installation

Installing with npm

npm i jobs-abstract

Installing with yarn

yarn add jobs-abstract

Getting Started

Create Job class extending Jobs Abstract and export it's instance.

class SampleJob extends JobsAbstract {
  async handle(): Promise<unknown> {
      console.log(`Called Job`);
      return undefined;
    }
}

To use it:

const sampleJob = new SampleJob();

  • sampleJob.everyTenMinutes().schedule()
  • sampleJob.hourly().schedule()
  • sampleJob.weekly().schedule()

Readme

Keywords

Package Sidebar

Install

npm i jobs-abstract

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

20.5 kB

Total Files

13

Last publish

Collaborators

  • manubhardwaj