且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何让 unix 脚本每 15 秒运行一次?

更新时间:2023-02-25 16:06:28

I would use cron to run a script every minute, and make that script run your script four times with a 15-second sleep between runs.

(That assumes your script is quick to run - you could adjust the sleep times if not.)

That way, you get all the benefits of cron as well as your 15 second run period.

Edit: See also @bmb's comment below.