Tuesday, February 28, 2012

Run ruby script as a background process in windows

Hi Ruby folks,

I went across a scenario in need of running a ruby process in background particularly in Windows OS(in Unix based system we can use '&' to run any process/job in background).

To run any ruby program in background, do the following

- Take a copy of the file, which you needs to run.
- Save the file as .rbw extension.
- Use the command
start "Your job description" ruby D:\Ruby\Jobs\particular_job.rbw

- Once it started running, You got a new console window with the given message on top and process status in console.

Cheers,
Vadivelan.K

No comments:

Post a Comment