Start and stop process

Hello,

I wrote a simple script to grab an audio stream and save it into a file.
I need to run this file 5 days a week, the process should record the
stream for ~ 2 hours. What is the best way to approach this problem?

I’m thinking of starting the process with a cron job, on a FreeBSD
server, but then what is the best way to control the process based on
time?

Panagiotis (atmosx) Atmatzidis

email: [email protected]
URL: http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5

“As you set out for Ithaca, hope the voyage is a long one, full of
adventure, full of discovery […]” - C. P. Cavafy

I think cron is the best solution.

If you have it run for 2 hours, you could simply kill its PID, probably
from within the ruby script anyway.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs