Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
933 views
in Technique[技术] by (71.8m points)

ruby on rails - Daemoninsing a rake task

I have a rake task which runs mailman under the rails environment.

I'd like to ensure that rake task is always running via a daemon.

My rake task is rake incoming_mail

How would I go about daemonising that?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In linux in order to run a process in background, you can add & to the end of command. So

rake incoming_mail &

should probably do the jobs for you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...