I've got a PHP script I'd like to launch when my RHEL server boots up.

Should I just add this line to /etc/rc.d/rc.local?

php -q /path/to/my/script.php > /path/to/output.txt

Or is there some better way?

    a month later

    I'm sure you've figured this out by now, one way or the other. For the Next Google User(tm):

    There's several ways to skin that cat, and rc.local is a good one.

    Perhaps even less known is the "@" target in your crontab(5):

    @reboot                        /usr/bin/php -q /path/to/somescript.php
      Write a Reply...