Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了以下命令行以每 2 分钟运行一次 cron 作业
2 * * * * php -f /home/u260451427/public_html/cron/cron_sms_sending_queue.php
我的服务器配置看起来像这样
但它不工作。
2 * * * * <command>每小时每两分钟运行一次。
2 * * * * <command>
来自'man 5 cron':
Step values can be used in conjunction with ranges... Steps are also permitted after an asterisk, so if you want to say ``every two hours'', just use */2
因此,您的 crontab 条目应该是
*/2 * * * * <command>