[ Video Sharing CMS v4 ] Youtube Crones Not working

Started by indiyatube,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marius P.

Quote from: indiyatube on
Ok. Should i replace it with original file? Will it set?

Yes, your cron data is stored in the db, so changing the file will not reset/remove the crons.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

indiyatubeTopic starter

Quote from: @Mario on
Yes, your cron data is stored in the db, so changing the file will not reset/remove the crons.

Ok then what should i do then? Plz give me details.
  •  

Marius P.

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

indiyatubeTopic starter

Quote from: @Mario on
Replace cron.php with the original one.

Replaced it with original file. Still cant get it. But now no error coming to mail. But videos not importing.
  •  

Marius P.

Quote from: indiyatube on
Replaced it with original file. Still cant get it. But now no error coming to mail. But videos not importing.

Maybe because there are no new videos, usually this should work once a day, tops 2, import everything, and all the rest of the execution will return the same videos, and get skipped.

Not sure you understand how Youtube API goes, but it returns 3-500 results per search tops.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

indiyatubeTopic starter

Quote from: @Mario on
Maybe because there are no new videos, usually this should work once a day, tops 2, import everything, and all the rest of the execution will return the same videos, and get skipped.

Not sure you understand how Youtube API goes, but it returns 3-500 results per search tops.

But old version imported all updated videos time to time. Ok i will wait for 24hours lets see.
  •  

Marius P.

Quote from: indiyatube on
But old version imported all updated videos time to time. Ok i will wait for 24hours lets see.

There is no change in the crons since they where released.
You can add the shel_exec, but I don't see the point, if plesk is triggering the cron.
You can play with executing the cron manually, it may give you an idea if something is wrong in the cron confing in the admin.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

indiyatubeTopic starter

Quote from: @Mario on
There is no change in the crons since they where released.
You can add the shel_exec, but I don't see the point, if plesk is triggering the cron.
You can play with executing the cron manually, it may give you an idea if something is wrong in the cron confing in the admin.

Ok. Once please check PM Please.

Thank you.
  •  

Marius P.

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

anchantw

Hi,

I also have same problem not working Youtube Crons on phpVibe 3.6 Second Edition, although old version(3.6) was no problem.

I found error and difference between old version and new one.

difference:

I cannot find the following code from new index.php file

Quote
/* Crons trigger */
if(function_exists('exec')) {
$time_passed = time() - get_option('cron_lastrun');
$cron_interval = get_option('cron_interval');

if( $time_passed  > $cron_interval) {
$arrOutput = '';
update_option('cron_lastrun', time());
$binpath = get_option('binpath','/usr/bin/php');
$command = $binpath." -f ".ABSPATH."/cron.php";
exec( "$command > /dev/null &", $arrOutput );
}
}

I wanna use server cron job, so I did comment out above code in old version index.php.
But new version one I cannot find so as Scheduled Task just only support server crons, right?


Error:
When I run cron.php, just like /usr/bin/php -f cron.php, I got following error message;

Quote
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo.so' - /usr/lib64/php/modules/pdo.so: undefined symbol: executor_globals_id in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_mysqlnd.so' - /usr/lib64/php/modules/pdo_mysqlnd.so: undefined symbol: php_pdo_register_driver in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_sqlite.so' - /usr/lib64/php/modules/pdo_sqlite.so: undefined symbol: php_pdo_register_driver in Unknown on line 0
Not in cron execution range (cron time not meet)...

I don't understand this error because my server php modules are all fine, of course pdo.so, pdo_mysqlnd.so and pdo_sqlite.so are fine.


Anyway with old version it was fine to cron job every hour but now fail.
# Not every hour fails it seems every 6 hour succeed. But I never set up cron jobs every 6 hour.

So please fix this problem soon.

Thank you


Regards,
  •  

Marius P.

Quote from: anchantw on
So please fix this problem soon.

Hi, your errors say that PDO db module is installed bad/not working. Not a code issues (we don't even use PDO).


For cron, did you check step 4 http://www.phpvibe.com/installing-phpvibe/ on how to setup the server cron?
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

anchantw

Quote
Hi, your errors say that PDO db module is installed bad/not working. Not a code issues (we don't even use PDO).
Sorry, I'm not programmer so I don't know this error in detail but I understand now.

Quote
For cron, did you check step 4 http://www.phpvibe.com/installing-phpvibe/ on how to setup the server cron?
I set up server cron by editing crontab like this;
0 8-23 * * * /usr/bin/php -f /path/to/documentroot/cron.php

Old version worked fine but new version(2nd edition) does not work correctly.
I don't know reason why it works only 8:00, 14:00 and 20:00.
# I never changed Scheduled Task on phpvibe.

I just wanna work every hour like old version.
  •  

Marius P.

I guess you've added the cron wrong in your panel (looks so)
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

anchantw

Quote
I guess you've added the cron wrong in your panel (looks so)
My cron job is not wrong because old version worked fine.
# I also never changed cron job(crontab).
  •  

indiyatubeTopic starter

Hi,

   Finally one problem solved for me. But again new problem raises. After adding More Channels for cron. Only last 4 channels i added was doing job. The older channels stopped cron autoimporting. I dont know why. If i use for 4 channels it was working absolutely charm.

Thanking You.
  •  

indiyatubeTopic starter

Quote from: indiyatube on
Hi,

   Finally one problem solved for me. But again new problem raises. After adding More Channels for cron. Only last 4 channels i added was doing job. The older channels stopped cron autoimporting. I dont know why. If i use for 4 channels it was working absolutely charm.

Thanking You.

Working absolutely fine for me after some time. THank You Very Much.
  •  

Marius P.

Quote from: anchantw on
My cron job is not wrong because old version worked fine.
# I also never changed cron job(crontab).

The old version was using PHP's shell_exec to trigger the cron, the new version uses the system cron (panel/server cron), so they are different things, don't compare them!
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.

Quote from: indiyatube on
Working absolutely fine for me after some time. THank You Very Much.

"Abuse" the "clear cache" in the admin panel ;)
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

anchantw

Quote from: @Mario on
The old version was using PHP's shell_exec to trigger the cron, the new version uses the system cron (panel/server cron), so they are different things, don't compare them!
Could you check what I said again.
Old version and new version the same, I just use server cron(edit crontab);
Quote
I set up server cron by editing crontab like this;
0 8-23 * * * /usr/bin/php -f /path/to/documentroot/cron.php
This is system cron!
  •  

Marius P.

Did you browse to /cron.php in your browser to see if it executes or has any output?
By defaults crons are set to once per day, you have to edit them from admin to make this time smaller.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

anchantw

Quote from: @Mario on
Did you browse to /cron.php in your browser to see if it executes or has any output?
By defaults crons are set to once per day, you have to edit them from admin to make this time smaller.

Browser output like this

Quote
Not in cron execution range (cron time not meet)Not in cron execution range (cron time not meet)Not in cron execution range (cron time not meet)Not in cron execution range (cron time not meet)

And I know crons are set to once per day(86400s), so I set up run interval 3600s(1 hour) anytime and now set 600s(10 minutes), but every 6 hours run import script. Why?
  •  

Marius P.

The runtime depends (as I've writen up) from two elements:

-  system cron runtime
-  cron time setup in admin (via edit cron)

There is nothing else affecting it.

When you save a cron is added with 86400 seconds as runtime (once every 24 h).

The other thing, is that Youtube no longer refreshes feeds in real time, they have a cache period, so fast results in the api are no longer available.


Not sure what's affecting you, you know your setup in the admin best.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

anchantw

Quote
Not sure what's affecting you, you know your setup in the admin best.
In the admin(this means phpvibe moderator page, right?) all youtube cron run interval 3600s(1 hort) at first, now change to 600s(10 munites).
And system cron trigger I set up from 8:00 to 23:00 on every hour like this:
0 8-23 * * * /usr/bin/php -f /path/to/documentroot/cron.php

But only 08:00, 14:00 and 20:00 cron runs at this time.

Quote
The other thing, is that Youtube no longer refreshes feeds in real time, they have a cache period, so fast results in the api are no longer available.
I don't understand this mean but you want to say my problem is youtube problem?
  •  

Marius P.

Quote from: anchantw on
My cron job is not wrong because old version worked fine.
# I also never changed cron job(crontab).

Then just make sure the cron has execute permissions, or look in your logs and see if there is any problem related to the cron, I can't tell you like this what's wrong on your setup.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.

Quote from: anchantw on
I don't understand this mean but you want to say my problem is youtube problem?

I'm telling you that if there are no new videos returned by Youtube the crons won't import anything (normal!).
Setup an e-mail alert there in the cron, to monitor when the system triggers it and with what output.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Similar topics (7)