You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{Injectable,Logger}from'@nestjs/common';import{Cron}from'@nestjs/schedule';
@Injectable()exportclassTasksService{privatereadonlylogger=newLogger(TasksService.name);
@Cron('task-service.handleCron')handleCron(){this.logger.debug('Called when the current second is 45');}}
What is the motivation / use case for changing the behavior?
I believe that using cron expressions in hard code is not useful because there are use cases where the cron expression could be changed, and defining it as a config will facilitate that change, although we can register dynamically using schedule register, I believe that having this via decorator would be really useful.
The text was updated successfully, but these errors were encountered:
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
I would like load cron expression from a config, without implement a dynamic cron job.
Describe the solution you'd like
Teachability, documentation, adoption, migration strategy
No response
What is the motivation / use case for changing the behavior?
I believe that using cron expressions in hard code is not useful because there are use cases where the cron expression could be changed, and defining it as a config will facilitate that change, although we can register dynamically using schedule register, I believe that having this via decorator would be really useful.
The text was updated successfully, but these errors were encountered: