, Ruby , ,
puts `command here`
, ,
c:\windows\system32\powercfg.exe -change -standby-timeout-ac 0
puts `c:\\windows\\system32\\powercfg.exe -change -standby-timeout-ac 0`
\ . , . , .
- , . , , . , 10 ,
puts `c:\\windows\\system32\\powercfg.exe -change -standby-timeout-ac 10`
So, you can disable sleep mode at the beginning of the script and enable sleep again.
Hope this suits you!
source
share