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

[Feature Request]: Computer shutdown/sleep request #42038

Closed
3 tasks done
JuanIrache opened this issue May 4, 2024 · 1 comment
Closed
3 tasks done

[Feature Request]: Computer shutdown/sleep request #42038

JuanIrache opened this issue May 4, 2024 · 1 comment

Comments

@JuanIrache
Copy link

Preflight Checklist

Problem Description

With Windows, you can use node's child_process exec to run the shutdown command and power the computer off, for example, if a long series of automated tasks has been left running overnight. On Mac and Linux this would need to be preceded by sudo, so it's not practical without breaking things, I believe.

Proposed Solution

Could some functions that instruct the OS to turn off or sleep be implemented as part od the API? Or does something like that already exist?

Alternatives Considered

I understand this topic may have security implications, but apps like Adobe Media Encoder do this, so there may be a way for the OS to allow this, right?

Additional Information

Thanks

@codebytere
Copy link
Member

Thanks for reaching out!

Because we treat our issues list as the team's backlog, we close issues that are questions since they don't represent a task needing to be completed. This forum is for raising bugs or requesting new features, and for most questions about Electron there are a lot of more appropriate community options. There are helpful people in this Discord or the subreddit that should be willing to point you in the right direction.

Beyond that - I agree that the OS can do it, but this is something that should be done in e.g. a native Node.js module, and not a part of the core API.

@codebytere codebytere closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants