我如何得到一个cron工作每30分钟运行一次? [英] How would I get a cron job to run every 30 minutes?

查看:122
本文介绍了我如何得到一个cron工作每30分钟运行一次?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望添加一个 crontab 条目,以便每30分钟,每小时和每小时30分钟执行一个脚本或关闭。我有以下,但它似乎不在0上运行。

  * / 30 * * * * 



我需要使用什么字符串?



cron正在OSX上运行。

解决方案

执行:

  0,30 * * * * your_command 




I'm looking to add a crontab entry to execute a script every 30 minutes, on the hour and 30 minutes past the hour or something close. I have the following, but it doesn't seem to run on 0.

*/30 * * * *

What string do I need to use?

The cron is running on OSX.

解决方案

Do:

0,30 * * * * your_command

这篇关于我如何得到一个cron工作每30分钟运行一次?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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