• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] PHPVibe 3.3 Crons import issue

Started by repute,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

reputeTopic starter

What about the crons to download new youtibe videos from search/channels you want on an hourly basis.
Is it in already, cant find it.

Thanks for helping me out :D
  •  

Marius P.

Quote from: repute on
What about the crons to download new youtibe videos from search/channels you want on an hourly basis.
Is it in already, cant find it.

Thanks for helping me out :D

http://phprevolution.com/youtube-video-importer/ Maybe this video will give you an idea :)
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!
  •  

reputeTopic starter

I see the automate button and clicking on it show the message a crons is added but I dont see it back on the scheduled task page in the admin.

PS I did upgrade from rc1 with the upgrade script.
  •  

Marius P.

Quote from: repute on
I see the automate button and clicking on it show the message a crons is added but I dont see it back on the scheduled task page in the admin.

Do you have any errors occurring?
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!
  •  

hunt07777

I have a cron setup.. but it still has yet to pull the new video..
The YT user is HisVision777 and the new video is.. http://www.youtube.com/watch?v=Z133D2ow7hQ (test),
and the cron is...
http://screencast.com/t/vCY1fpkAgo,
but it says, it "never"... ran.. yet is set to 100 seconds. ???
  •  

Marius P.

3 questions :

1. Did you open the site meanwhile?
2. Do you have "exec" active on server?
3. Does it run when you visit domain.com/cron.php in browser?
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!
  •  

hunt07777

I do have a command... on the server.
http://screencast.com/t/ieOL2x9bGkAR set to every minute...
but it appears that the cron only runs..
When I go to http://www.tgn10.com/cron.php manually.

It did work once.. but I think, that's only because you went to that address manually.

I have cron set to every 100 secs (vibe admin - SCHEDULED TASKS). http://screencast.com/t/y0XKREnCGbp
I have cron set to user id # 1 in (Owner of cron imports - CONFIGURATION) http://screencast.com/t/BmyuyK6IWYAN

And I have uploaded... http://www.youtube.com/watch?v=OyoWhBMkOho&feature=youtu.be  as a new test video to my channel.

I think all the bases are covered? No?

Thanks bud.
  •  

Marius P.

Yes, but cron setup looks like it has no time (in the image).

PHPVibe has a native cron trigger in the root index.php, so it should fire on user access to if the timing is right.
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!
  •  

hunt07777

Well, it eventually did post last night...
But I am not sure if you did it or if it did it itself...
Hostmonster, said that ****** means that it will run every minute.
I changed it to 5 minutes.

So it did show on the site, but it took a few hours.

Just to verify..
http://screencast.com/t/EBmkf01riD
Run Interval is in "seconds" right?
It's saying the last time it ran was last night? http://screencast.com/t/EBmkf01riD
It's now 10/10 and 12:00:00, so that was almost 20 hours ago.

???
  •  

Marius P.

In vibe_config.php is this field:

/** Timezone (set your own) **/
date_default_timezone_set('Europe/Bucharest');

Info: http://php.net/manual/en/function.date-default-timezone-set.php
You should change it to your own so you can track normal time for you.
Yes, it's in seconds the run interval.
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!
  •  

hunt07777

Awesome...
I made the change.
http://www.php.net/manual/en/timezones.php (according to this).

Very good.. So I manually ran the cron by visiting www.tgn10.com/cron.php..
and got http://screencast.com/t/2Wr14mvVzcRo

So now.. I am going to test it now.. to see when it runs again from this point.

Thanks.
  •  

Marius P.

Ok, but running the cron every minute from cpanel...you basically ping for nothing...

At least if you trigger it from cpanel, remove this from index.php (root) :
/* 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());
$command = "/usr/bin/php5 -f ".ABSPATH."/cron.php";
exec( "$command > /dev/null &", $arrOutput );
}
}
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!
  •  

hunt07777

K. I removed the line of code from the index page..
Going to test the interval.
  •  

hunt07777

Ok, waited 20mins.. no change.
I added.. http://www.youtube.com/watch?v=UvyuA4Rf8FU&feature=youtu.be to the youtube channel..
However it has not show on the website.

??
Hmm??
  •  

Marius P.

https://gdata.youtube.com/feeds/api/users/userId/uploads?v=2&alt=json



change userId with your user and see if Youtube already returns that video.


What is the time in the cron in the admin? You need the be careful to that to, as it will not trigger if the time has not passed even if you go to /cron.php
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!
  •  


hunt07777

K. It still didn't work. It did however work when I went to the page in a browser.

Is there some sort of command that I am supposed to write in the cron job?

Hmm.
  •  

Marius P.

No command. It was meant to be triggered via a internal exec...but I guess you could use a webcron as well
I'll run some test with cpanel crons on some fresh install and let you know what I could digg.
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!
  •  

hunt07777

Oh.. so you are saying that it always worked internally.. and that setting up a cron job through my cpanel, wasn't what I was supposed to do?

I had no clue.

Hmm.. well let me put the code back then...
And if it was.. then it wasn't running according to interval time on the script. ???

I am going to put the code back in the index.php

Cause I would rather have it run 1x a day, then not have it run at all.
  •  

Marius P.

It works for me on all setups...you can see on videosqq, "the bad guy" is the 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!
  •  

hunt07777

Then I must be doing something wrong.. hmm. Mario can I send you access via email, that way I can solve this mystery and help others not to miss the same thing, by posting the solution here?
  •  

Marius P.

I just need your admin panel access for starters to check the cron config.
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!
  •  

hunt07777

Yes, I readded the cron code to the index page...
And in 1 day.. no update.
So I have emailed you my platform user/pass combo...
Hopefully we can figure out together, what I am missing, so that others can learn from my mistake.
Thank you so much Mario for your due diligence in this matter.
You are greatly appreciated!!!

Also.. if it works.. the latest video that should show up on the site.. is..
http://www.youtube.com/watch?v=NGE0GMZhm6Y

Thanks so much.
  •  

Marius P.

I can check it tomorrow, it's 22:12 on a sunday night here and I'm on my way into the old center.
But tomorrow I'll get back to you with an answer.
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!
  •  

hunt07777

You got it bud. Thanks again. Talk to you soon.
  •  

Similar topics (7)