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