php - Ezpublish 使用这两个 CRON 文件中的哪个 cron 文件

标签 php linux ubuntu cron ezpublish

嗨,我想阻止我的 crons 在 ezpublish 中运行,

所以在 /var/www/ezpublish.cron 我评论了所有的东西并使用

重新启动了 cron 服务
sudo service cron restart

ezpublish.cron 文件

# This must be set to the directory where eZ Publish is installed.
#EZPUBLISHROOT=/path/to/the/ez/publish/directory

# Location of the PHP Command Line Interface binary.
#PHP=/usr/local/bin/php

# Instruct cron to run the main set of cronjobs
# at 6:35am every day
#35 6 * * * cd $EZPUBLISHROOT && $PHP runcronjobs.php -q 2>&1

# Instruct cron to run the "infrequent" set of cronjobs
# at 5:20am every Monday
#20 5 * * 1 cd $EZPUBLISHROOT && $PHP runcronjobs.php -q infrequent 2>&1

# Instruct cron to run the "frequent" set of cronjobs
# every 15 minutes
#0,15,30,45 * * * * cd $EZPUBLISHROOT && $PHP runcronjobs.php -q frequent 2>&1

但今天我发现我的 crons 还在工作,所以我再次检查,我发现另一个 cron 文件在

/var/spool/cron/crontab/root

# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.FrnXNP/crontab installed on Sun Apr  6 04:10:54 2014)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
# This must be set to the directory where eZ Publish is installed.
EZPUBLISHROOT=/var/www

# Location of the PHP Command Line Interface binary.
PHP=/usr/bin/php

# Instruct cron to run the main set of cronjobs
# at 6:35am every day
1  * * * * cd /tmp && run-parts --report /etc/cron.daily 2>&1
35 6 * * * cd $EZPUBLISHROOT && $PHP runcronjobs.php -q 2>&1

# Instruct cron to run the "infrequent" set of cronjobs
# at 5:20am every Monday
20 5 * * 1 cd $EZPUBLISHROOT && $PHP runcronjobs.php -q infrequent 2>&1

# Instruct cron to run the "frequent" set of cronjobs
# every 15 minutes
0,15,30,45 * * * * cd $EZPUBLISHROOT && $PHP runcronjobs.php -q frequent 2>&1
*/5 * * * * cd $EZPUBLISHROOT && $PHP runcronjobs.php -q frequent 2>&1
0 * * * * cd $EZPUBLISHROOT && $PHP runcronjobs.php -q videoPreview 2>&1

所以 Ezpublish 到底使用了哪个 cron 文件,我很困惑。提前谢谢你

最佳答案

'crontab -e' 是您机器的 cronjobs 列表,它不属于 ezpublish。

cronjobs 如何与 ezpublish 一起工作是您在列表中看到的命令:

cd $EZPUBLISHROOT = 这将导航到您的 ezpublish 的根目录。 然后“$PHP runcronjobs.php -q frequent”将在 ezpublish 根目录中的 runcronjobs.php 上运行 php 命令行。

“频繁”是您的 cronjob 任务组的名称,您可以在 cronjob.ini 或 cronjob.ini.append.php 中找到它。

你那里有这样的东西: [CronjobPart-frequesnt] 然后在运行上述命令时运行属于该组的所有脚本。 确保它们位于您的扩展程序或内核的 cronjob 文件夹中[根本不是推荐的方式]。

您可以阅读更多here .

我尽量多解释,也许有些是不需要的。

关于php - Ezpublish 使用这两个 CRON 文件中的哪个 cron 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25279933/

相关文章:

php - Sum 查询不能正常工作正常 sql 和 php

Php通过.htaccess重写url

python - 将新角色添加到 azure 上的同一云服务

linux - Qt 版本歧义?

linux - Makefile:需要执行的命令存储在一个列表中

javascript - 将变量从 Php 传递到 js?

c - OpenCV 2.3.0+ : cvCaptureFromCAM returns null

linux - 关闭终端后继续运行 bash 命令

ubuntu - 可以创建文件,但不能修改?

javascript - 获取页面内容,就像用户打开一样