Jump to content
Nelson_JTNSolutions

Cronjob Not Running - Error when checking service -CentOS 7 (php) ERROR (getpwnam() failed)

Recommended Posts

This has had me and my IT stumped. Hes been busy so I need to get this fixed myself. I'm not entirely sure what is happening or how to fix it. I am very new to linux so I will try whatever you suggest but remember that I don't understand some of the terminology.

 

As for what I've done, I made sure the crond service was running. I ended up getting this error when restarting the service.

 

crond[9437]: (php) ERROR (getpwnam() failed)

 

What I have in the cronjob file is:

 

* * * * * php -q /var/www/*myhost*/public_html/crons/cron.php

 

 

Any help is appreciated.

Share this post


Link to post
Share on other sites

Corrected the issue myself. I had to specify my php path and add root as the user. So the new job looks like this

 

* * * * * root /usr/bin/php -q /var/www/*myhost*/public_html/crons/cron.php

 

Thats what corrected my error. I hope this can help someone if they have this same problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated