Crontab 命令未运行

Crontab 命令未运行

我在我的 crontab 上看到这个错误:

Dec  8 09:51:01 ikeyprod cron[29245]: Error: bad username; while reading /etc/crontab

我已经验证这些命令都可以通过 sudo 手动推送。

-rw-r--r--   1 root     root     2.2K 2010-12-08 09:50 crontab

这些命令没有运行,我不确定为什么...但是我看到了上述错误...

    # /etc/crontab: system-wide crontab
    # Unlike any other crontab you don't have to run the `crontab'
    # command to install the new version when you edit this file
    # and files in /etc/cron.d. These files also have username fields,
    # that none of the other crontabs do.

    SHELL=/bin/sh
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    MAILTO="[email protected]"

    # m h dom mon dow user  command
    17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
    25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
    47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
    52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )

    # ----- IKEY -----
    5  0    * * *   root    bash /sites/domain.com/scripts/backup.sh
    0  3    * * *   root    php /sites/domain.com/www/cron/clear-expired-carts.php
    0  1    * * 7   root    php /sites/domain.com/www/cron/generate-vehicle-sitemap.php
    3  3    * * *   root    php /sites/domain.com/www/cron/account/update-dealer-map.php

    # ----- IKEY INTERNAL -----
    15 1    * * 1-5 root    php /sites/internal.domain.com/www/cron/account/clock/accountability-report.php
    0  6    * * 1   root    php /sites/internal.domain.com/www/cron/account/clock/tardy-report.php
    0 22    * * *   root    php /sites/internal.domain.com/www/cron/account/clock/clock-out.php

    # > Orders
    #*  *    * * *   root    php /sites/internal.domain.com/www/cron/order/generate-invoice-pdf.php

# > eBay
30 1    * * *   root    php /sites/internal.domain.com/www/cron/ebay/get-feedback.php
*  *    * * *   root    php /sites/internal.domain.com/www/cron/ebay/archive/get-listing-data.php
10 *    * * *   root    php /sites/internal.domain.com/www/cron/ebay/archive/associate-product-with-listing.php
20 *    * * *   root    php /sites/internal.domain.com/www/cron/ebay/archive/update-listing-status.php

# > Fleetkeys
*  6    * * 2   root    php /sites/internal.domain.com/www/cron/fleetkeys/invoice/get-unpaid-invoices.php

# > Maintenance
0 3    * * 0 mysqlcheck -Aao –auto-repair -u root -p PASSWORD > /dev/null

答案1

您的 crontab 需要最后一行的用户名(mysqlcheck)。

并且:您可能想要现在更改该 MySQL 根密码。

答案2

问题是最后一行

0 3    * * 0 mysqlcheck -Aao –auto-repair -u root -p password > /dev/null

您缺少用户名

相关内容