@grandlinex/bundle-cron
    Preparing search index...

    @grandlinex/bundle-cron

    GrandLineX Cron Bundle

    Cron support for GrandLineX

    img

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

    GitHub NPM TS

    Quality Gate Status Security Rating Maintainability Rating Reliability Rating Coverage

    Bugs Vulnerabilities Code Smells


    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 * * * *',
    });
    }
    }