Sentora Support Forums
Issues with Cron Jobs with CentOS - Printable Version

+- Sentora Support Forums (https://senforums.mach-hosting.com)
+-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5)
+--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32)
+---- Forum: General Support Forum v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=36)
+---- Thread: Issues with Cron Jobs with CentOS (/showthread.php?tid=1422)



Issues with Cron Jobs with CentOS - Kyle - 04-11-2015

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?


RE: Issues with Cron Jobs with CentOS - Me.B - 04-12-2015

try run manually the command line?


RE: Issues with Cron Jobs with CentOS - americanninja - 04-12-2015

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.


RE: Issues with Cron Jobs with CentOS - Kyle - 04-13-2015

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.


RE: Issues with Cron Jobs with CentOS - asifshabir - 06-27-2015

(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