Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have two PHP scripts that I need to start on boot. I have a CentOS powered VPS, and I normally use the following command to start the scripts.

screen php scriptname.php

However, if the server crashes, how can I have the scripts start automatically on boot?


share|improve this question

1 Answer 1

up vote 2 down vote accepted

Add your command to /etc/rc.d/rc.local

share|improve this answer
And similary thread on… :) – strangeman Jul 13 '11 at 3:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.