LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Run script automatically (https://www.linuxquestions.org/questions/linux-newbie-8/run-script-automatically-475521/)

shipon_97 08-19-2006 11:12 PM

Run script automatically
 
Friends ,

I am using Redhat Enterprise Linux 4 server . I have written a SCRIPT
into my server . Now I want a situation ,

my "script" is running automatically when my pc is restarting . i.e.,How I can run my script automatically everytime when I reboot
my pc .

prozac 08-19-2006 11:34 PM

put something like this in your /etc/rc.local file

Code:

sh /path/to/your/script

billymayday 08-20-2006 12:13 AM

Another, fairly simple way is yo add a line to crontab

@reboot /your/file/to/run


All times are GMT -5. The time now is 07:49 PM.