UNPKG

shutdown-in-x-hours

Version:

Shut down your Windows machine in X seconds from the command line.

9 lines (7 loc) 257 B
#!/usr/bin/env node "use strict"; let exec = require("child_process").exec; let hours = process.argv[2]; let seconds = hours * 3600; exec("shutdown -s -t 10"); console.log("Your computer is set to shut down automatically in " + hours + " hours.");