Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Cron('* * * * *')
- public async test() {
- console.log(this)
- }
- import { CronJob } from 'cron';
- export function Cron(pattern: string) {
- return (t: Object, p: string, d: PropertyDescriptor) => {
- new CronJob(pattern, () => d.value(), null, true, 'America/Los_Angeles');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement