如何在运行 linux 命令前休眠 10 秒?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4420799/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 00:17:08 来源:igfitidea点击:
How to sleep 10 seconds before running a linux command?
提问by eric
Simple question: I want to run a cron operation every minute at the 10th second (for example at 2:00:10 PM). The cron operation runs a curl command to download a website page. How can I run a cron operation to do that?
简单的问题:我想在第 10 秒(例如下午 2:00:10)每分钟运行一次 cron 操作。cron 操作运行 curl 命令来下载网站页面。我如何运行 cron 操作来做到这一点?
Current crontab setting:
当前的 crontab 设置:
* * * * * curl http://www.google.com/
采纳答案by Martin v. L?wis
* * * * * sleep 10;curl http://www.google.com/