嗨,我想阻止我的亲信在ezpublish上运行,
所以在/var/www/ezpublish.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

但是今天我发现我的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 RuncRunJOS.php -q-勤”将运行在ErrSunJOP.PHP中的PHP命令行,该命令存在于EZBub的根目录中。
“frequent”是cronjob的一组任务的名称,您可以在cronjob.ini或cronjob.ini.append.php中找到它。
你在里面有这样的东西:
[CronjobPart频率]
然后,当运行上述命令时,属于此组的所有脚本都将运行。
确保它们位于扩展或内核的cronjob文件夹中[根本不是推荐的方式]。
您可以阅读更多here
我试着尽可能多地解释,也许其中一些是不需要的。

08-07 05:41