Delay your commands on the command line using human intervals.
npm install delay-cmdDelay your commands on the command line using human intervals.
``javascript`
npm i delay-cmd -g
`javascript`
delay-cmd five seconds
Put the command you want to delay after the &&.
`javascript`
cd /c/path/to/yourProject
delay-cmd two hours && npm start
Must be used in an async function.
`javascript`
const delayCmd = require("delay-cmd");
await delayCmd("five seconds");
I made delay-cmd as a CLI. For node.js use I recommend implementing this:
`javascript
//setup
const delay = require("delay");
const humanInterval = require("human-interval");
async function delayCmd(time) {
console.log("waiting for" + time);
await delay(humanInterval(time));
}
//usage
await delayCmd("five seconds");
``
If you appreciate my work please tip me! Any amount is good. Thank you :)
Patreon:
Paypal: