Linux really uses shell scripts to do timed mission critical nohup

Source: Internet
Author: User

There are a lot of articles on the Internet to teach you to use scheduled tasks, so other nonsense I will not say more


I here directly have sh to do timing, just a little people do not know, must use Nohup, otherwise the user exits terminal, SH task will be automatically terminated


Suppose there is a tash.sh, note the following, are the essence


Start is: nohup/home/spex/bin_proddemo/task.sh & make sure to take the path full, absolute address

Just quit, remember to quit!!! exit the terminal with Exit !! Do not exit directly. Otherwise it's useless.


Then look at the PS aux|grep task

You can see it running right there.


Root 279 0.0 0.0 0 0? S Sep26 0:00 [KHUNGTASKD]
Spex 11488 0.0 0.0 63868 1096? S 14:52 0:00/bin/sh/home/spex/bin_proddemo/task.sh
Spex 11544 0.0 0.0 61208 756 PTS/3 s+ 14:53 0:00 grep task





Linux really uses shell scripts to do timed mission critical nohup

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.