This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Issues with Cron Jobs with CentOS
#1
Issues with Cron Jobs with CentOS
Okay, I'm trying to scratch my head here why the cron jobs aren't working on CentOS 7.

This is what I did...

1) I checked to make sure that the directory /var/spool/cron is owned by apache:apache and with permissions 770 & /var/spool/cron/apache is owned by apache:apache and with permissions 660

2) I checked for trailing slashes and and made sure that there aren't slashes at the beginging of the file location field when adding cron jobs and setting it to run every minute.

So far, nothing seems to be executed or changes to my database. I had a code that should be changing fields in the database, I confirmed that it is working by running the file manually on URL. But the cron job isn't working for some reason.

So I decided to take a look into the /var/log/cron, it does seem the crons are being executed, but not actually being executed.

Apr 11 02:20:01 panel CROND[9536]: (apache) CMD (php -d suhosin.executor.func.blacklist="passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec" -d open_basedir="/var/sentora/hostdata/zadmin/:/var/sentora/temp/" /var/sentora/hostdata/zadmin/public_html/{URL_REMOVED}/cron_jobs/test.php)

So, this makes me wonder, there is an issue with running PHP on crons, or I'm not sure why?

Any ideas?
Reply
Thanks given by:
#2
RE: Issues with Cron Jobs with CentOS
try run manually the command line?
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask
Freelance AWS Certified Architect & SysOps// DevOps

10$ free to start your VPS
Reply
Thanks given by:
#3
RE: Issues with Cron Jobs with CentOS
Did you ever find a solution to this?

I have exactly the same problem with my Sentora Ubuntu 14.04 install. I'm running Drupal sites on my server and while the php line for the cron job is being run, at least it shows in the /var/log/syslog file, it doesn't seem to be executing the cron file. No changes are taking place on my Drupal sites.

I'm hoping you found the reason why it wasn't working and can share with us. I'm completely stuck on this. Nothing makes sense.
Reply
Thanks given by:
#4
RE: Issues with Cron Jobs with CentOS
I got it working, I had an error in my coding due to openbase restrictions.

You will want to manually run the command and see what's being outputted for errors.
Reply
Thanks given by:
#5
RE: Issues with Cron Jobs with CentOS
(04-12-2015, 01:11 AM)Me.B Wrote: try run manually the command line?

how do you run the cron manually other then sentora gui .

thanks to provide some details here
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
OS - Ubuntu 18.04 or Centos 8 Qrash 1 4 ,661 01-18-2021, 07:48 PM
Last Post: Jettaman
How to run multiple version PHP with Apache (use Sentora panel) on Centos ??? BigBang 4 7 ,791 12-23-2020, 03:31 PM
Last Post: djkashdui1
How To Add Letsencrypt SSL certificate To Domain Centos 7 franselect 1 4 ,155 07-04-2020, 02:55 AM
Last Post: Feilding Weather

Forum Jump:


Users browsing this thread: 1 Guest(s)