@grandlinex/bundle-cron
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

GrandLineX Cron Bundle

Cron support for GrandLineX

Description

img

GrandLineX is an out-of-the-box server framework.

GitHub NPM TS

Status

Quality Gate Status Security Rating Maintainability Rating Reliability Rating Coverage

Issues

Bugs Vulnerabilities Code Smells

Install

Example

class TestKernel extends CoreKernel<any> {
  constructor(appName:string, appCode:string) {
    super( { appName, appCode});
    
    // ...

      /** 
       * Add the module to the kernel
       */
      
      this.addModule(new CronModule(this));

      /**
       * Define kernel event
       */
      
      this.on("test-trigger",()=>{
          console.log("test-trigger");
      })
      
      /**
       * Add cron timer
       */
      const mod = kernel.getChildModule('cron') as CronModule;
     
      const client = mod.getClient() as CronClient;
       client.registerCron({
          trigger: 'test-trigger',
          name: 'test',
          cron: '0 * * * *',
      });
  }
}

Documentation

Dependencies (2)

Dev Dependencies (23)

Package Sidebar

Install

npm i @grandlinex/bundle-cron

Weekly Downloads

19

Version

1.0.1

License

BSD-3-Clause

Unpacked Size

25.7 kB

Total Files

22

Last publish

Collaborators

  • elschnagoo