nest-schedule
nest-schedule copied to clipboard
After upgrading to latest version 0.6.0 a JobRepeatException is thrown
Hey,
after upgrading to the latest version 0.6.0 I get the following exception:
(node:82651) UnhandledPromiseRejectionWarning: #<JobRepeatException>
(node:82651) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:82651) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I'm using the @Cron
decorator. Where do I have to set the key or do I have to set the key at all?
Thanks for your help.
I think you have another job with the same key maybe, it should be global unique(The default key is function name if you not specific it),
You should set a key when schedule a job such as @Cron('', {key: 'test-key'})
now.
I will try use class name as namespace to resolve it in the future version, thanks
Thanks for your prompt reply. It solved my issue.
First I checked the readme if I can set the key using the decorator and did not pay enough attention that ICronJobConfig
actually extends IJobConfig
. Maybe you could update the readme (section @Cron
decorator).
Thanks for your prompt reply. It solved my issue.
First I checked the readme if I can set the key using the decorator and did not pay enough attention that
ICronJobConfig
actually extendsIJobConfig
. Maybe you could update the readme (section@Cron
decorator).
I will update readme soon, thank you!