This is the development version of Kanrisuru. Since this is still a pre-1.0 release, we don't recommend using this in system-critical production environments.



Poweroff a server in ruby.
linux manual

Basic Usage

require 'kanrisuru'
host = '', username: 'ubuntu', keys: ['~/.ssh/id_rsa'])

result = host.poweroff(time: '11:11', message: 'This server is being turned off.')


Field Type Description
time string
Either an integer (in minutes) or a string in the format of "HH:MM", or "now" that sets when the system should be rebooted.
cancel boolean
Cancel an already scheduled reboot.
message string
Write to all logged in users about the rebooting server.
no_wall boolean
Do not send wall message before reboot.


No explicit data struct returned, only option is success?, failure?, and status to see if the program exited properly.

Exit Status

Code Description
0 Success
1 Failure

Tested On

  • Ubuntu, Debian, Centos, Fedora, Redhat, OpenSuse, SLES