以下cronjob代表什么?

时间:2013-11-03 10:55:05

标签: ubuntu cron sphinx

我有这个cronjob,Sphinx推荐我运行:

*/5 * * * * /usr/bin/php /var/www/wp-content/uploads/sphinx/cron/cron_reindex_delta.php
5 0 * * * /usr/bin/php /var/www/wp-content/uploads/sphinx/cron/cron_reindex_main.php
*/5 * * * * /usr/bin/php /var/www/wp-content/uploads/sphinx/cron/cron_reindex_stats.php

我已经查了一下cronjobs,但我找不到上面命令中那些正斜线的含义。第1和第3个命令是否每天运行五个小时,第二个命令每五天运行一次?如果我错了,请告诉我这是正确的解释。

由于

1 个答案:

答案 0 :(得分:2)

正如您在https://stackoverflow.com/tags/cron/info

中所看到的
 +---------------- minute (0 - 59)
 |  +------------- hour (0 - 23)
 |  |  +---------- day of month (1 - 31)
 |  |  |  +------- month (1 - 12)
 |  |  |  |  +---- day of week (0 - 6) (Sunday=0 or 7)
 |  |  |  |  |
 *  *  *  *  *  command to be executed

所以:

*/5 * * * * /usr/bin/php /var/www/wp-content/uploads/sphinx/cron/cron_reindex_delta.php
*/5 * * * * /usr/bin/php /var/www/wp-content/uploads/sphinx/cron/cron_reindex_stats.php
每隔5分钟

5 0 * * * /usr/bin/php /var/www/wp-content/uploads/sphinx/cron/cron_reindex_main.php

每天0.05