@Cron() decorator not working
AlariCode opened this issue · comments
Anton Larichev commented
Thanks for a great plugin for nest. @Interval
decorator is working perfectly, but I can't start @Cron
.
import { Injectable } from '@nestjs/common';
import { Cron, NestSchedule } from 'nest-schedule';
@Injectable()
export class ScheduleService extends NestSchedule {
constructor() {
super();
}
@Cron('* * * * *')
clear() {
console.log('clear data ...');
}
}
No log in console every minute.
Dependencies:
"dependencies": {
"@nestjs/common": "^5.0.0",
"@nestjs/core": "^5.0.0",
...
}
Miaow commented
I have fix it, you can try the latest version 0.3.1, thks~.😁
Anton Larichev commented
Thank you! You are lightning fast)