linux - 服务器定时计划crontab参数疑问
大家讲道理
大家讲道理 2017-04-17 15:32:35
0
4
667

具体的crontab命令参数我知道一次分别是:分 时 日 月 周 脚本命令

如果我想设置每半小时执行一次改怎么设置呢!这样设置的30 时 日 月 周 脚本命令貌似没执行呢!没拉到日志

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(4)
Ty80

You are executing this at 30 minutes every hour, so you are executing it once an hour
In the window that comes out of crontab -e, you don’t need to write the user name, just write the command directly

*/30 * * * * 命令
黄舟

*/30 * * * * means execution every thirty minutes

The configuration of the script is:
分 时 日 月 周 用户 脚本命令
Don’t omit the running user, otherwise the command will be parsed into the user, causing failure

迷茫

Your setting really doesn’t work, it should be like this*/30 * * * * /server/php7.02/php /htdocs/example.web.com/action/post/example.php

Peter_Zhu

Graphic reference method
http://www.corntab.com/

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!