How to control a server program easy? CGI?

I wrote a ruby program, it is running in CentOS as a server program, in
same situation, I need to change the time that the program run, such as
the program should run at 6:00, not the 7:30 am
, I need modify the configure file and then upload it to the server
using FTP, then logon on the server, kill the program, then re- start
it.

I believe it is not a smart way. There should be many easy method to do
so.

I hope I can change the running time easy, like just logon a web, then
input the new time, then click effect button, the program will be kill
and start to run using new time at remote server.

How to do that? using CGI?
Any help would be grate appreciated.

Regards
Jingdong