Join the community 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:
    12:41 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

    55,245
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    2:41 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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