Learn about Centmin Mod LEMP Stack today
Register Now

Cron - ERROR (getpwnam() failed)

Discussion in 'System Administration' started by alan, May 23, 2020.

  1. alan

    alan New Member

    20
    4
    3
    Dec 16, 2016
    Ratings:
    +5
    Local Time:
    11:07 PM
    i added this to crontab

    * * * * * root /usr/local/bin/php path-to-php-file >/dev/null

    but got this error: ERROR (getpwnam() failed)

    i have tried to change to other username but still the same.

    Can help advice?
     
  2. eva2000

    eva2000 Administrator Staff Member

    44,186
    10,074
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,572
    Local Time:
    1:07 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    how did you add the cronjob ? where did you add it ?

    use crontab -l to view current cronjobs and crontab -e command to invoke nano text editor see guide at HowTo: Add Jobs To cron Under Linux or UNIX?

    example of out of box centmin mod setup cronjobs excluding wordpress wp-cli
    Code (Text):
    crontab -l
    13 23 * * * /usr/local/src/centminmod/tools/autoprotect.sh >/dev/null 2>&1
    0 */4 * * * /usr/bin/cminfo_updater 2>/dev/null