Skip to content

imanubhardwaj/jobs-abstract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()

About

Abstract Class for scheduling jobs in Node.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published