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