0

嗨,我想阻止我的 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 文件,我很困惑。提前谢谢你

4

2 回答 2

2

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

cronjobs 如何使用 ezpublish 是您在列表中看到的命令:

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

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

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

你可以在这里阅读更多。

我尝试尽可能多地解释,也许其中一些是不需要的。

于 2014-08-13T14:29:48.920 回答
1

您的问题似乎是 cron 设置问题,而不是 eZPublish 问题。eZPublish 可以使用任何 cron 文件。

于 2014-09-09T07:50:07.443 回答