cron issue Or something else ??

OK I have made a fresh install of 7.1 >> I have installed everything correctly and all files and permissions are correct!

php.ini is also all correct ...

I have used the correct cron command (have used this at other working sites) and still there seems to be an issue with cron !

if I manually run cron it works .... 

What else could prevent it from working ??

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
1 Feb 2013

does anyone have any ideas about this ?

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

nope!

sorry Josh just had to post.. I am looking into it though..

ManOfTeal.COM a Proud UNA site, six years running strong!
2 Feb 2013

What is the correct cron command? Thanks

2 Feb 2013

crontab running as proper owner? 

Geeks, making the world a better place
2 Feb 2013

What does the Host Tools in the backend say about cron jobs?  That is where I learned that although I had set up a cron job, I did not have the proper owner set.  If it says, "no cron jobs for xxxx" then you know it is not seeing a cron job for the owner of the website.

Geeks, making the world a better place
2 Feb 2013

I am using this command:

php -q /var/www/vhosts/WEBSITENAME.info/httpdocs/periodic/cron.php

This command is working at all other dolphin sites I own!   

My new project is a new install and everything is set up correctly just as I have always done .... For some reason the cron just will not work!

Is there a issue with crons and '.info' domains ?? .... This might be a silly question BUT I have set up enough WORKING sites to know I am very confused right now and looking for any possible issue that might be causing this ?

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

host tools shows me this:-

SHELL=/usr/local/psa/bin/chrootsh
*	*	*	*	*	php -q /var/www/vhosts/***********.info/httpdocs/periodic/cron.php
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

I notice at one of my other Working sites the host tools shows this following... I don't know why its different with new project ?? :

SHELL=/bin/bash
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

 

quote deleted cause question already answered.

 Here is my cron job don't know if this helps 

* * * * * cd /home/*My-Site*/public_html/periodic; /usr/local/bin/php -q cron.php >> /dev/null 2>&1

2 Feb 2013

OK so I gather this part is wrong ... how do I resolve this please ?

SHELL=/usr/local/psa/bin/chrootsh
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

 I have plesk panel and the path / command I give is certainly correct ...

I think this issue is as described in my previous posts

 

quote deleted cause question already answered.

 Here is my cron job don't know if this helps 

cd /home/*My-Site*/public_html/periodic; /usr/local/bin/php -q cron.php >> /dev/null 2>&1

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

Im sure this is the issue:-

chrootsh
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

 should look like this:

SHELL=/bin/bash

 

Im sure this is the issue:-

chrootsh

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

I had similar problems until I set up the cron for user 'root'.  After this worked, I didn't investigate the issue any further.

 

cd /var/www/vhosts/site.info/httpdocs/periodic; /usr/bin/php -q cron.php

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
2 Feb 2013

 The host tools should show the following ... any idea how I change it please ? :-

SHELL=/bin/bash

 

I had similar problems until I set up the cron for user 'root'.  After this worked, I didn't investigate the issue any further.

 

cd /var/www/vhosts/site.info/httpdocs/periodic; /usr/bin/php -q cron.php

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

If you don't mind, I would like to ask if when you said 'if I manually run cron it works', did you mean you run the php on the shell using ssh directly? Also, have you tried restarting your cron service? 

On my case, if I do wan't to check if my cronjobs did run I do create a .txt file for its output. A sample is to create a result.txt file inside your /var/www/vhosts/***********.info/httpdocs/ directory and on your cron please change it to php -q /var/www/vhosts/***********.info/httpdocs/periodic/cron.php > /var/www/vhosts/***********.info/httpdocs/result.txt and see if your result.txt file has an output in it after several minutes. Also please make sure that your PHP binary path is right. 

http://www.ebboonex.com - Boonex Module Development
2 Feb 2013

 I mean run cron manually via URL

If you don't mind, I would like to ask if when you said 'if I manually run cron it works', did you mean you run the php on the shell using ssh directly? Also, have you tried restarting your cron service? 

On my case, if I do wan't to check if my cronjobs did run I do create a .txt file for its output. A sample is to create a result.txt file inside your /var/www/vhosts/***********.info/httpdocs/ directory and on your cron please change it to php -q /var/www/vhosts/***********.info/httpdocs/periodic/cron.php > /var/www/vhosts/***********.info/httpdocs/result.txt and see if your result.txt file has an output in it after several minutes. Also please make sure that your PHP binary path is right. 

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

I know that this is the issue:- SHELL=/usr/local/psa/bin/chrootsh

it should look like this:- SHELL=/bin/bash

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

I would like to ask if you do have an ssh access on your server?

http://www.ebboonex.com - Boonex Module Development
2 Feb 2013

 yes I do ....

I would like to ask if you do have an ssh access on your server?

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

Ok, thats great! Could you please try and run this command on your shell? php -q /var/www/vhosts/***********.info/httpdocs/periodic/cron.php

http://www.ebboonex.com - Boonex Module Development
2 Feb 2013

I see this:-

SHELL=/bin/bash
*       *       *       *       *       php -q /var/www/vhosts/**********.info/h
ttpdocs/periodic/cron.php
~

how come my host tools shows this instead ?? :- SHELL=/usr/local/psa/bin/chrootsh

ssh shows one thing and host tools another !?

I am adding crons via plesk just as I always have !

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

All my WORKING dolphin sites show this:- SHELL=/bin/bash and then command

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

I am about to go to sleep now but I will just give you a bit of things to try before I go.

Create a php file inside the /var/www/vhosts/***********.info/httpdocs/ directory and add this scripts

<?php

 

echo PHP_BINARY . "<br/>";

echo PHP_BINDIR . "<br/>";

 

?>

and the run your site using http://www.mysiteurl.com/thenameofthefile.php

In this way you can see the php binary path of your server. On my localhost, the path was /usr/bin but this one would really depend on the way the server is setup since most of the live server uses symbolic links. After seeing your binary path, please change 'php -q /var/www/vhosts/***********.info/httpdocs/periodic/cron.php' to '/your php binary path/php -q /var/www/vhosts/***********.info/httpdocs/periodic/cron.php' and then restart cron using 'service cron restart' or '/etc/init.d/cron restart'. I am currently using Ubuntu at this moment and this is the way were I restart my cron but it might be different on your server as well, most of the live servers were using redhat and I can remember a lot of difference about them but I am not quite sure if restarting a cronjob is one of them. But anyway, you can try this suggestion and tell me if it does fix your problem. 

http://www.ebboonex.com - Boonex Module Development
2 Feb 2013

I need to change SHELL=/usr/local/psa/bin/chrootsh    TO      :- SHELL=/bin/bash ??

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

 I get this result:-

PHP_BINARY
/usr/bin

I am about to go to sleep now but I will just give you a bit of things to try before I go.

Create a php file inside the /var/www/vhosts/***********.info/httpdocs/ directory and add this scripts

<?php

 

echo PHP_BINARY . "<br/>";

echo PHP_BINDIR . "<br/>";

 

?>

and the run your site using http://www.mysiteurl.com/thenameofthefile.php

In this way you can see the php binary path of your server. On my localhost, the path was /usr/bin but this one would really depend on the way the server is setup since most of the live server uses symbolic links. After seeing your binary path, please change 'php -q /var/www/vhosts/***********.info/httpdocs/periodic/cron.php' to '/your php binary path/php -q /var/www/vhosts/***********.info/httpdocs/periodic/cron.php' and then restart cron using 'service cron restart' or '/etc/init.d/cron restart'. I am currently using Ubuntu at this moment and this is the way were I restart my cron but it might be different on your server as well, most of the live servers were using redhat and I can remember a lot of difference about them but I am not quite sure if restarting a cronjob is one of them. But anyway, you can try this suggestion and tell me if it does fix your problem. 

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

someone ..... anyone .....! I have already wasted to much time with this issue .... someone must know how to resolve this ?

I need to change SHELL=/usr/local/psa/bin/chrootsh    TO   :- SHELL=/bin/bash ?

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

Try running this

/usr/local/psa/bin/server_pref -u -crontab-secure-shell /bin/sh


Post error if you get any.

so much to do....
2 Feb 2013

 -bash-4.1$ /usr/local/psa/bin/server_pref -u -crontab-secure-shell /bin/sh
Could not open Repository at "/etc/sw/keys": Cannot open file
Unable to connect to database: get_admin_password() failed: file_get_contents() failed

/usr/local/psa/bin/server_pref -u -crontab-secure-shell /bin/sh

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

run it as root man lol

so much to do....
2 Feb 2013

 SUCCESS: Server preferences are successfully updated !

;)   what now ?

run it as root man lol

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

Your cron should run...or try a server reboot then wait for cron to fire.

so much to do....
2 Feb 2013

 ok man this seems to be working with my original cron command :)  thanks a lot ...

NOW the mass mailer is working and videos processing BUT I keep getting error emails like this when uploading videos:-

Subject: Cron <****************@****************> php -q /var/www/vhosts/****************.info/httpdocs/periodic/cron.php
ffmpeg version 0.10 Copyright (c) 2000-2012 the FFmpeg developers
  built on Feb  2 2012 01:28:23 with gcc 4.4.3
  configuration: --extra-ldflags=-static --extra-cflags=-static --enable-static --disable-shared --enable-ffplay --disable-ffprobe --disable-ffserver --enable-runtime-cpudetect --enable-memalign-hack --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-libxvid --enable-libvpx --enable-gpl --enable-nonfree --enable-pthreads --enable-libopenjpeg --enable-zlib --enable-bzlib --enable-libxavs --enable-libdirac --enable-libschroedinger --enable-libvo-amrwbenc --enable-libfreetype --enable-libnut --enable-libspeex --enable-libaacplus --enable-libfaac --enable-small --enable-libass --enable-libdc1394 --enable-librtmp --enable-openssl --enable-frei0r --enable-libopencv
  libavutil      51. 34.101 / 51. 34.101
  libavcodec     53. 60.100 / 53. 60.100
  libavformat    53. 31.100 / 53. 31.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 60.100 /  2. 60.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100

ETC ETC ETC ETC ETC ..........

You cron should run...or try a server reboot then wait for cron to fire.

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

Where is the error message in that? lol i have no idea what it is :(

so much to do....
2 Feb 2013

I see this also:-

Original-Recipient: rfc822; *********
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; User unknown in virtual alias table

 

why am I getting those messages ?

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

is your server hostname and site domain is same?

so much to do....
2 Feb 2013

 What does this do please .... since I run it my CPU has gone up ALOT !!

/usr/local/psa/bin/server_pref -u -crontab-secure-shell /bin/sh

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

 no I don't think so ... different subscription on same server

is your server hostname and site domain is same?

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

 Since you did this, your crons started using your CPU

For reference http://kb.parallels.com/en/9523

 What does this do please .... since I run it my CPU has gone up ALOT !!

/usr/local/psa/bin/server_pref -u -crontab-secure-shell /bin/sh

 

 

so much to do....
2 Feb 2013

 uhhh OK man how can I reverse this please I am watching my usual 0.2 CPU hit 312%  ?!!

Cron is killing CPU BIG TIME

 Since you did this, your crons started using your CPU

 What does this do please .... since I run it my CPU has gone up ALOT !!

/usr/local/psa/bin/server_pref -u -crontab-secure-shell /bin/sh

 

 

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

php-cgi = 70% CPU

mysqld hit 240% just now ?

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

Check your process log, you have many long videos or emails pending?

so much to do....
2 Feb 2013

 OMG serious sh!t, what was there waiting for cron to run like hell Surprised.
It might be email or some records updates? Is it a production site? Age of site? For how long cron not running? 

php-cgi = 70% CPU

mysqld hit 240% just now ?

 

so much to do....
2 Feb 2013

nope nothing pending .... how can I reverse it please ?

CPU is crazy high at points since change

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

disable/remove your cron :|

so much to do....
2 Feb 2013

I have removed that cron and in-fact the entire 'new' site files and DB and still CPU is crazy ....

Do I have to remove cron jobs for other sites at my server ?   I assume the instruction I followed has effected all other sites and crons ??

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

Its your private server? Other users site are on this server too?

That change made the crons to run under root and not in chroot.

so much to do....
2 Feb 2013

 I have multi dolphin sites (all mine) on same server ...

Its your private server? Other users site are on this server too?

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013

 So this would effect all dolphin sites at server ?

I really need to get this back to normal ....

Its your private server? Other users site are on this server too?

That change made the crons to run under root and not in chroot.

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
2 Feb 2013
2 Feb 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.