如何在运行linux命令之前睡眠10秒钟? [英] How to sleep 10 seconds before running a linux command?

查看:618
本文介绍了如何在运行linux命令之前睡眠10秒钟?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个简单的问题:我想在第10秒的每分钟运行一次cron操作(例如,下午2:00:10). cron操作运行curl命令下载网站页面.如何执行cron操作来做到这一点?

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?

当前crontab设置:

Current crontab setting:

* * * * * curl http://www.google.com/

推荐答案

* * * * * sleep 10;curl http://www.google.com/

这篇关于如何在运行linux命令之前睡眠10秒钟?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆