@visimedia/system-shutdown

1.0.3 • Public • Published

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

systemShutdown.js

Cross-platform support to shutdown a computer from Node.js

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Run program using sudo or admin permission on Windows

Provides simple cross-platform support to shutdown a computer from Node.js

(back to top)

Built With

  • Node

(back to top)

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
    npm install npm@latest -g

Installation

  1. Clone the repo
    git clone https://github.com/VisiSolutions/systemShutdown.js.git
  2. Install NPM packages
    npm install

(back to top)

Usage

npm install @visimedia/system-shutdown
let Shutdown = reuquire("shutdown_computer");
let s = new Shutdown();
async function shutdown() {
  try {
    await s.initShutdown();
  } catch (err) {
    console.error(err);
  }
}

// OR Scheduale the Shutdown
s.schedualeShutdown({ sec: 10, min: 0, hour: 0 });
// You may pass in any combination of the time unit

// For Example
s.schedualeShutdown({ sec: 10, min: 1 });
// OR
s.schedualeShutdown({ hour: 1 });

(back to top)

Roadmap

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Copyright (C) 2023 VisiMedia Ltd

(back to top)

Contact

Ben Lewis - ben.lewis@visimedia.co.uk

Project Link: https://github.com/VisiSolutions/systemShutdown.js

(back to top)

Package Sidebar

Install

npm i @visimedia/system-shutdown

Weekly Downloads

2

Version

1.0.3

License

ISC

Unpacked Size

7.79 kB

Total Files

4

Last publish

Collaborators

  • benjisoft
  • visiben