Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@Cron() decorator not working #2

Closed
AlariCode opened this issue Aug 29, 2018 · 2 comments
Closed

@Cron() decorator not working #2

AlariCode opened this issue Aug 29, 2018 · 2 comments

Comments

@AlariCode
Copy link

AlariCode commented Aug 29, 2018

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",
    ...
}
@miaowing
Copy link
Owner

I have fix it, you can try the latest version 0.3.1, thks~.😁

@AlariCode
Copy link
Author

Thank you! You are lightning fast)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants