Execute command on every boot

You want to execute a command on every boot but do not want to create an init script? Well, if your *nix system supports cron jobs which is very likely it is your lucky day.

Just open the cron file for the user who in whose name the command is supposed to run.

crontab -e

Add the following line to the open cron file and obviously replace YOUR COMMAND with whatever should be run on start-up.

@reboot YOUR COMMAND

Save the changes and now on every boot your command is executed once. Simple as that!


Leave a Reply