How to use the midway.schedule function in midway

To help you get started, we’ve selected a few midway examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github midwayjs / midway-examples / demo-plugin-schedule / src / lib / schedule / hello.ts View on Github external
import { schedule } from 'midway';

@schedule({
  type: 'all',
  interval: 1000,
})
export default class TestCron {
  async exec(ctx) {
    ctx.logger.info('hello world');
  }
}

midway

A Node.js Serverless Framework for front-end/full-stack developers. Build the application for next decade.

MIT
Latest version published 3 years ago

Package Health Score

60 / 100
Full package analysis