I'm currently running a few programmes - unreal, anope and the qwebirc web client on startup with crontab.
Anope dosen't take to a non graceful shutdown well, i use flat files for data as opposed to mysql and they corrupt often - i figure if i can get anope shutdown properly via the script it should solve it.
Approaches i suppose might work are using an init script, since crontab dosen't seem to have a @shutdown option, but i'd really like to do shut down apps at shutdown it at as the user i start at.
running ubuntu, but it should be the same on any box running linux
If the daemon doesn't have an init script, you must create your own. Just use an existing script as a template. If you need to execute commands as the user who owns the process, use su or sudo in your init script.
rc0.d is the directory that is processed during a shutdown, be sure to place a symlink to your init script there.
Ubuntu has switched to upstart now, you might also want to take a look at that.