Init.d vs Cron - which to use?

Solution 1:

Since this sounds like a run-and-be-done script I would say that /etc/rc.local or cron (time: @reboot) is definitely the way to go.

On the other hand, anything which will stay daemonized should definitely has its own init script. If nothing else, to make sure it shuts down properly.

Solution 2:

/etc/rc.local gets executed on each boot, after all the other init scripts run. That would be another easy-to-implement option.

Solution 3:

Cron is a time based system. There are a lot of ways to do it. In lenny, you can use a script in /etc/rc.local. This file will be run at end of process, after all network startup that is needed to send mails.