-
Notifications
You must be signed in to change notification settings - Fork 626
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
[BUG] setTime() starts the job even if the job was stopped #598
Labels
Comments
setTime() now starts the job, even if it was already stopped. Should not restart if job wasn't running. |
intcreator
changed the title
[FEATURE] Make setTime automatically restart job / New release
[BUG] setTime() starts the job even if the job was stopped
Apr 6, 2023
sheerlox
added a commit
to sheerlox/node-cron
that referenced
this issue
Apr 14, 2023
sheerlox
added a commit
to sheerlox/node-cron
that referenced
this issue
Apr 14, 2023
sheerlox
added a commit
to sheerlox/node-cron
that referenced
this issue
Apr 16, 2023
intcreator
pushed a commit
that referenced
this issue
Apr 22, 2023
ncb000gt
pushed a commit
that referenced
this issue
Jul 24, 2023
## [2.4.0](v2.3.0...v2.4.0) (2023-07-24) ### β¨ Features * import type definitions from [@types](https://github.com/types)/cron ([d8a2f14](d8a2f14)) ### π Bug Fixes * don't start job in setTime if it wasn't running ([7e26c23](7e26c23)) ### π Builds * **npm:** ship type definitions with releases ([0b663a8](0b663a8)) ### π¨ Tests * add test case for [#598](#598) fix ([4322ef2](4322ef2)) * don't stop/start job before using setTime ([f0d5d3f](f0d5d3f)) ### βοΈ Continuous Integrations * add support for beta & maintenance releases ([#677](#677)) ([c6fc842](c6fc842)) * setup conventional commits & release automation ([#673](#673)) ([c6f39ff](c6f39ff)) ### β»οΈ Chores * update default branch name ([#678](#678)) ([7471e95](7471e95)) * wrap setTime tests in describe and move down ([31989e0](31989e0))
π This issue has been resolved in version 2.3.1 π The release is available on: Your semantic-release bot π¦π |
patrickm68
added a commit
to patrickm68/node-cron-types
that referenced
this issue
Sep 14, 2023
## [2.4.0](kelektiv/node-cron@v2.3.0...v2.4.0) (2023-07-24) ### β¨ Features * import type definitions from [@types](https://github.com/types)/cron ([d8a2f14](kelektiv/node-cron@d8a2f14)) ### π Bug Fixes * don't start job in setTime if it wasn't running ([7e26c23](kelektiv/node-cron@7e26c23)) ### π Builds * **npm:** ship type definitions with releases ([0b663a8](kelektiv/node-cron@0b663a8)) ### π¨ Tests * add test case for [#598](kelektiv/node-cron#598) fix ([4322ef2](kelektiv/node-cron@4322ef2)) * don't stop/start job before using setTime ([f0d5d3f](kelektiv/node-cron@f0d5d3f)) ### βοΈ Continuous Integrations * add support for beta & maintenance releases ([#677](kelektiv/node-cron#677)) ([c6fc842](kelektiv/node-cron@c6fc842)) * setup conventional commits & release automation ([#673](kelektiv/node-cron#673)) ([c6f39ff](kelektiv/node-cron@c6f39ff)) ### β»οΈ Chores * update default branch name ([#678](kelektiv/node-cron#678)) ([7471e95](kelektiv/node-cron@7471e95)) * wrap setTime tests in describe and move down ([31989e0](kelektiv/node-cron@31989e0))
sheerlox
pushed a commit
that referenced
this issue
Sep 27, 2023
## [2.4.0](v2.3.0...v2.4.0) (2023-07-24) ### β¨ Features * import type definitions from [@types](https://github.com/types)/cron ([d8a2f14](d8a2f14)) ### π Bug Fixes * don't start job in setTime if it wasn't running ([7e26c23](7e26c23)) ### π Builds * **npm:** ship type definitions with releases ([0b663a8](0b663a8)) ### π¨ Tests * add test case for [#598](#598) fix ([4322ef2](4322ef2)) * don't stop/start job before using setTime ([f0d5d3f](f0d5d3f)) ### βοΈ Continuous Integrations * add support for beta & maintenance releases ([#677](#677)) ([c6fc842](c6fc842)) * setup conventional commits & release automation ([#673](#673)) ([c6f39ff](c6f39ff)) ### β»οΈ Chores * update default branch name ([#678](#678)) ([7471e95](7471e95)) * wrap setTime tests in describe and move down ([31989e0](31989e0))
sheerlox
pushed a commit
to sheerlox/node-cron
that referenced
this issue
Sep 27, 2023
## [2.4.0](kelektiv/node-cron@v2.3.0...v2.4.0) (2023-07-24) ### β¨ Features * import type definitions from [@types](https://github.com/types)/cron ([d8a2f14](kelektiv@d8a2f14)) ### π Bug Fixes * don't start job in setTime if it wasn't running ([7e26c23](kelektiv@7e26c23)) ### π Builds * **npm:** ship type definitions with releases ([0b663a8](kelektiv@0b663a8)) ### π¨ Tests * add test case for [kelektiv#598](kelektiv#598) fix ([4322ef2](kelektiv@4322ef2)) * don't stop/start job before using setTime ([f0d5d3f](kelektiv@f0d5d3f)) ### βοΈ Continuous Integrations * add support for beta & maintenance releases ([kelektiv#677](kelektiv#677)) ([c6fc842](kelektiv@c6fc842)) * setup conventional commits & release automation ([kelektiv#673](kelektiv#673)) ([c6f39ff](kelektiv@c6f39ff)) ### β»οΈ Chores * update default branch name ([kelektiv#678](kelektiv#678)) ([7471e95](kelektiv@7471e95)) * wrap setTime tests in describe and move down ([31989e0](kelektiv@31989e0))
sheerlox
pushed a commit
to sheerlox/node-cron
that referenced
this issue
Sep 29, 2023
## [2.4.0](kelektiv/node-cron@v2.3.0...v2.4.0) (2023-07-24) ### β¨ Features * import type definitions from [@types](https://github.com/types)/cron ([d8a2f14](kelektiv@d8a2f14)) ### π Bug Fixes * don't start job in setTime if it wasn't running ([7e26c23](kelektiv@7e26c23)) ### π Builds * **npm:** ship type definitions with releases ([0b663a8](kelektiv@0b663a8)) ### π¨ Tests * add test case for [kelektiv#598](kelektiv#598) fix ([4322ef2](kelektiv@4322ef2)) * don't stop/start job before using setTime ([f0d5d3f](kelektiv@f0d5d3f)) ### βοΈ Continuous Integrations * add support for beta & maintenance releases ([kelektiv#677](kelektiv#677)) ([c6fc842](kelektiv@c6fc842)) * setup conventional commits & release automation ([kelektiv#673](kelektiv#673)) ([c6f39ff](kelektiv@c6f39ff)) ### β»οΈ Chores * update default branch name ([kelektiv#678](kelektiv#678)) ([7471e95](kelektiv@7471e95)) * wrap setTime tests in describe and move down ([31989e0](kelektiv@31989e0))
This was referenced Sep 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
β Suggestion
In 1.8.2, cronjob.setTime() stops the job and change the time but doesn't automatically starts the job back.
It would be nice to start it automatically, maybe checking first if it was running before.
π» Use Cases
We sometimes want to change the cron expression of a running job. We have to call start() again which is a bit counter intuitive.
β Related Problems
On master, it looks like the setTime method already starts back the job after changing the time.
I can see the last release is from 2 years ago, is there any plan for a new release ?
The text was updated successfully, but these errors were encountered: