Skip to content

Remove child_process dependency for improved browser compatibility #967

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

Open
WillianAgostini opened this issue Feb 27, 2025 · 7 comments
Open
Labels
type:feature New feature or feature improvement & requests

Comments

@WillianAgostini
Copy link
Contributor

⭐ Suggestion

Discussion #960

Currently, node-cron depends on child_process to execute string-based commands, which prevents it from being used in browser environments.

I propose completely removing the child_process dependency to enhance browser compatibility and make node-cron more versatile across different platforms.

💻 Use Cases

Running node-cron in a browser-based environment.

❌ Related Problems

#538
#426
#345
#333
#299
#171

@WillianAgostini WillianAgostini added the type:feature New feature or feature improvement & requests label Feb 27, 2025
WillianAgostini added a commit to WillianAgostini/node-cron that referenced this issue Feb 27, 2025
BREAKING CHANGE: Removed the ability to execute system commands using string-based inputs.
This eliminates the dependency on `child_process`, improving browser compatibility.
Users relying on this functionality should migrate to executing commands manually within their own implementations.

kelektiv#967
WillianAgostini added a commit to WillianAgostini/node-cron that referenced this issue Feb 27, 2025
BREAKING CHANGE: Removed the ability to execute system commands using string-based inputs.
This eliminates the dependency on `child_process`, improving browser compatibility.
Users relying on this functionality should migrate to executing commands manually within their own implementations.

kelektiv#967
@Func86
Copy link

Func86 commented Apr 9, 2025

For complete browser support, the impact of chained JS timers throttling should be assessed, and worker-timers or similar packages should be used if needed.

intcreator added a commit that referenced this issue Apr 19, 2025
)

<!--- Provide a general summary of your changes in the Title above
(following the Conventional Commits standard) -->
<!-- More infos: https://www.conventionalcommits.org -->
<!-- Commit types:
https://github.com/insurgent-lab/conventional-changelog-preset#commit-types-->

## Description

<!--- Describe your changes in detail -->
BREAKING CHANGE: Removed the ability to execute system commands using
string-based inputs. This eliminates the dependency on `child_process`,
improving browser compatibility. Users relying on this functionality
should migrate to executing commands manually within their own
implementations.
## Related Issue

<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->
#967
## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->
Running node-cron in a browser-based environment.
## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ X ] Breaking change (fix or feature that would cause existing
functionality to change)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ X ] My code follows the code style of this project.
- [ X ] My change requires a change to the documentation.
- [ X ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ X ] All new and existing tests passed.
- [ X ] If my change introduces a breaking change, I have added a `!`
after the type/scope in the title (see the Conventional Commits
standard).

Co-authored-by: Brandon der Blätter <intcreator@users.noreply.github.com>
intcreator added a commit that referenced this issue Apr 19, 2025
#982)

…968)

<!--- Provide a general summary of your changes in the Title above
(following the Conventional Commits standard) -->
<!-- More infos: https://www.conventionalcommits.org -->
<!-- Commit types:

https://github.com/insurgent-lab/conventional-changelog-preset#commit-types-->

## Description

<!--- Describe your changes in detail -->
BREAKING CHANGE: Removed the ability to execute system commands using
string-based inputs. This eliminates the dependency on `child_process`,
improving browser compatibility. Users relying on this functionality
should migrate to executing commands manually within their own
implementations.
## Related Issue

<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->
#967
## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->
Running node-cron in a browser-based environment.
## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. --> <!---
Include details of your testing environment, and the tests you ran to
-->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ X ] Breaking change (fix or feature that would cause existing
functionality to change)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ X ] My code follows the code style of this project.
- [ X ] My change requires a change to the documentation.
- [ X ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ X ] All new and existing tests passed.
- [ X ] If my change introduces a breaking change, I have added a `!`
after the type/scope in the title (see the Conventional Commits
standard).

<!--- Provide a general summary of your changes in the Title above
(following the Conventional Commits standard) -->
<!-- More infos: https://www.conventionalcommits.org -->
<!-- Commit types:
https://github.com/insurgent-lab/conventional-changelog-preset#commit-types-->

## Description

<!--- Describe your changes in detail -->

## Related Issue

<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
- [ ] If my change introduces a breaking change, I have added a `!`
after the type/scope in the title (see the Conventional Commits
standard).

Co-authored-by: Willian Agostini <willian.agostini@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or feature improvement & requests
Projects
None yet
Development

No branches or pull requests

8 participants
@WillianAgostini @Func86 and others