@cheetah.js/schedule
v0.1.18
Published
Schedule module for Cheetah framework (Bun) ⏰
Downloads
2
Readme
Schedule plugin for Cheetah.js
This plugin provides a simple way to schedule tasks in Cheetah.js.
Installation
For install, run the command below:
bun install @cheetah.js/schedule
Usage
Only add the plugin to the Cheetah.js instance:
import {Cheetah} from '@cheetah.js/core';
new Cheetah().use(CheetahSchedule).listen();
Schedule tasks
Example:
import { Cheetah, Service, Get, Schedule } from '@cheetah.js/core';
@Service()
export class HomeController {
@Schedule('* * * * * *')
index() {
return '';
}
@Interval(1000)
index() {
return '';
}
@Timeout(1000)
index() {
return '';
}
}