Run any Ruby Script as a Windows Service with AlwaysUp

How to Run any Ruby Script as a Windows Service / Daemon with AlwaysUp

Kick off your Ruby script when your PC boots; Re-run it every hour/day

Ruby is an open source programming language known for its simplicity and productivity.

To set up a Ruby script to run as a Windows Service with AlwaysUp 6.0 and later:

  1. Download and install AlwaysUp, if necessary.

  2. Download and install Ruby, if necessary. The RubyIstaller package is recommended. Make a note of where you have installed Ruby as this folder will be used in a later step. We have installed RubyIstaller in C:\Ruby for this tutorial.

  3. Start AlwaysUp.

  4. Select Application > Add to open the Add Application window:

    Add Application

  5. On the General tab:

    • In the Application field, enter the full path to the Ruby executable (ruby.exe). This is C:\Ruby\bin\ruby.exe for our installation.

    • In the Arguments field, enter the full path to your Ruby script. We want to run our sample script, C:\Ruby\sample-script.rb.

    • In the Name field, enter the name that you will call this application in AlwaysUp. We have used My Ruby Script but you can specify virtually anything you like.

    Ruby Script Windows Service: General Tab

  6. Click over to the LogOn tab and enter the user name and password of the account where you installed Ruby. Please ensure that you can run your script successfully from that account.

    Ruby Script Windows Service: LogOn Tab

  7. If you only want your script to run periodically (that is, not 24/7), click over to the Restart tab and choose when to run. We would like our script to be run every day at 1 AM.

    Ruby Script Windows Service: Restart Tab

  8. Click the Save >> button. In a couple of seconds, an application called My Ruby Script will show up in the AlwaysUp window. It is not yet running though.

    Ruby Script Windows Service: Created

  9. To start the service, which will run the Ruby script at 1 AM, choose Application > Start "My Ruby Script".

    Ruby Script Windows Service: Running

  10. That's it! Next time your computer boots, your Ruby script be launched immediately, before anyone logs on. We encourage you to explore the many other settings that may be appropriate for your environment.

Ruby script not working properly as a Windows Service?

  • From AlwaysUp, select Application > Report Activity > Today... to bring up a HTML report detailing the interaction between AlwaysUp and your application. The AlwaysUp Event Log Messages page explains the more obscure messages.
  • Consult the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.
  • Contact us and we will be happy to help!

Download & Try it Free!

Download AlwaysUp and Run as a Service Today! Version 9.7 New!

4.6 MB Installer
  • Unrestricted 30-day trial for new users; upgrade for existing users
  • Windows 10/8.1/8/7/XP & Windows Server 2012 R2/2008/2003
  • How to Install | EULA
Our customers include...

Compatible with Windows 10 (32 & 64-bit)

Windows Server 2012 Certified (32 & 64-bit)

Windows 8 Compatible (32 & 64-bit)

Compatible with Windows 7 (32 & 64-bit)

Works with Windows Server 2008 R2 (32 & 64-bit)

Over 68,000 installations, and counting!
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 10+ years!