linux - How to write a background process or daemon process that does not time out or a cron process that is executed after a few hours
世界只因有你
世界只因有你 2017-06-21 10:12:10
0
1
870

It is known that a TTL ranges from 2 hours to 100 hours. I plan to write a script to execute another script after the TTL to implement a standby process. At first I wanted to use cron to implement it, but how to convert the given TTL into a cron expression for a specific date is a very complicated process that is difficult to implement perfectly.

So I thought of using & background execution process or using daemon daemon process , sleep TTL hours, and then execute another sh script. But it seems that because the TTL is too long, the system determines that the process has timed out. When I used 1 hour for testing, the second script would not be executed. I would like to ask you guys, how do you check the timeout period of the Linux system you are using?

In addition, how should I better implement the function of my script that is on standby?

世界只因有你
世界只因有你

reply all(1)
三叔

If your system uses systemd, you can use its timer systemd.timer to complete your needs. For details, please refer to /a/11...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template