Forum: Ruby Help with Apache cgi

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ernest Ellingson (Guest)
on 2006-01-26 06:10
(Received via mailing list)
I'm trying to port a cgi program that runs fine under windows.  But I
can't seem to get what I want done under linux.

I want to send out emails to a list of subscribers.  This program will
take about 10 minutes to run.

In windows I've been using the start command.  This actually starts a
process and the cgi program continues to run a tells the user that
emails are being sent.  The start command lets the program run in the
background.  The cgi program doesn't have to wait for the mail program
to finish.

I've tried
	z=fork do
		`mail progam`
	The program doesn't run.
I've tried writing a cronjobs file + 60'/var/www/cronjobs'){|f| f.write("#{t.min} #{t.hour} etc")}
          `crontab /var/www/cronjobs`

	crontab -u apache -l
	lists the cron job at the right minute, hour, month, etc.  but the cron
job doesn't run.

The only thing I've seen in the Rubytalk archives is a suggestion to
close stderr, stdin, and stdout in the child process when using fork.
That didn't help either.

Does anyone have a clue how to do this using apache and ruby?

Thanks in advance.

Ernest Ellingson (Guest)
on 2006-01-26 14:34
(Received via mailing list)
Ernest Ellingson wrote:
> to finish.
>          `crontab /var/www/cronjobs`
> Thanks in advance.
> Ernie
> --
> "Keep an open mind, but not so open that your brain falls out." (Richard
> Feynman)

I've figured it out.

Thanks to Thomas Uehlinger and the developers of daemons
It's really simple!!!

Thanks again

This topic is locked and can not be replied to.