Skip to content

zaheeruddinfaiz/shutdow_computer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shutdown_Computer

Run program using sudo or admin premission on Windows Shutdown Computer on any platform.

Install

$ npm install shutdown_computer

Usage

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 });

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published