Recently, I came across a situation where one job ideally began with an upstart, and the other with rc.local. Although both methods will execute your script, the upstart makes sense when demonstrating the script at run time; rc.local, on the other hand, allows you to run a script.
For example, if the script is already a daemon process, for example. server, it can be called by rc.local, since it does not stay in the foreground and blocks the terminal.
But if the script itself is not demonized, the upstart will give it the ability to gracefully start and stop during system events. This is useful for running a non-exiting PHP script in the background. Although you can use the upstart to launch, say, Apache httpd, the process "exits right away" in Upstart's eyes, which makes Upstart pointless because it is already "completed".
Schien
source share