Ubuntu: How to configure a script to start automatically after server reboot


I want to configure a script to execute automatically when a server is rebooted. Currently I need to start the script manually after server reboot. I am using Amazon Linux server.

I was able to configure the script to start automatically on my local ubuntu System as:

  1. I started terminal and typed crontab -e
  2. I added @reboot path/to/script and saved it.

After restart the script started automatically on my local machine.

When I try to do same on server crontab file is not opened.


You should use Upstart, not cron. Upstart is what's used to run commands at startup (and shutdown).

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »