ServerPronto Dedicated Servers
       ServerPronto Home   ServerPronto University     
ServerPronto University  

Support of the day: Dead Scripts


January 13th, 2012
If you regularly work with scripts on any Unix or Linux platform and it gets killed when you logout from ssh, the session dies or the scripts stops working after x time then you need to deown it and fork it to the background.
So instead of running
/your/script/filename
run
nohup /your/script/filename &
What this does is start the script, the nohup deowns the scripts (meaning that it has no owner so you can logout without killing the process) and the & at the end sends the process to the background. This is the alternative method to run something from within screen but this version works good with a crontab.
FYI the crontab is a file and a program (both named the same) that executes commands (opening files, sending email, any command that you could do via the regular shell) at specific interval or times.



Entry Filed under: Support of the day

 

Leave a Comment

hidden
Comment:

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed

 
Infolink ServerPronto Infolink Review Our Guarantee Why Choose ServerPronto? Why Choose ServerPronto? Review Our Guarantee Home About Why Choose ServerPronto? Compare Packages Frequently Asked Questions (FAQ) Order Now!