Re: Youtube Plugin: howto cron the youtube import?
Hi, currently it seems to me like the videos are imported only if admin logs in? How can the video import be automated, once setup?
Thanks!
You are not logged in. Please login or register.
ternstyle - Forum → Automatic YouTube Video Posts Plugin → Youtube Plugin: howto cron the youtube import?
Hi, currently it seems to me like the videos are imported only if admin logs in? How can the video import be automated, once setup?
Thanks!
You'd have to actually set up a cron job on your server itself. WordPress is all PHP. PHP doesn't usually have root access to the server to set up such jobs. So, WordPress runs queued functions whenever a request is made for the site if the call was made after the specified duration of time. One work around would be to have the plugin run not only on the request of a logged in administrator but also of users simply viewing the site. The problem i found with this was that at times the import process can get lengthy and I thought it unprofessional to have users of sites employing my plugin to have to wait for the import before they could view pages on your sites. Basically, working within the constraints of WordPress, PHP and good sense, you're stuck with it as is.
Could you please explain this even more detailed ? I know usually these things are done by cronjobs, but those have to be set up separately and not every webspace service offers cronjobs.
I'm a bit confused with the functioning of the automatic import method. In the settings I have set 'Import the latest videos every' to '1 hour'. And the description says that the script only runs when an administrator is logged in.
Now here's why I'm confused:
- The script works for me even when the admin is not logged in. E.g. I logged out at the evening several times, and then the next morning, the newest video has been imported, without the admin having logged in.
- Right now: A new video has been uploaded and published on YouTube 3 hours ago. But the video has not been imported yet.
If the settings can be set to 4 hours or 1 hour, I suppose they can be set to 15/30 minutes as well ? I mean, the goal is to import the video as fast as possible, without putting to much load on the server. But I would be happy if it worked within 1 hour, right now it's not working as I mentioned.
Maybe it's something with he Wordpress time settings ? There's a 6 or 7 hours time difference between YouTube and my server...
Thanks !
ternstyle - Forum → Automatic YouTube Video Posts Plugin → Youtube Plugin: howto cron the youtube import?
Powered by PunBB, supported by Informer Technologies, Inc.