Setting cronjob for batch video processing
You need to set cronjob for batch mode video processing and video import feature to work.
Recommended settings is
Code:
*/5 * * * * /usr/bin/php -q /path/to/cron.php > /dev/null 2>&1
You need to change following as per your server
/usr/bin/php
This is path to PHP. If php is on different location, you need to change the path as required.
/path/to/cron.php
This is path to cron.php on your web site.
For Cpanel Servers
Code:
*/5 * * * * /usr/bin/php -q /home/USERNAME/public_html/cron.php > /dev/null 2>&1
FOR PLESK
Code:
*/5 * * * * cd /var/www/vhosts/yourdomain.extn/httpdocs; /usr/bin/php -q cron.php > /dev/null 2>&1
Manual mode for processing video
Can it be possible to have both. I really can not make cron job work. Seems to be ok but is obviously wrong!
is this path ok?
/usr/bin/php -q /home/username/public_html/cron.php
or it has to have as an end > /dev/null &
Thanks for some help...
I receive email messages saying
Running process.php
CRON: 1
I do not know if it's ok.
other way for newbies like me a button like it used to be would be fine :-)
Sorry..perhaps this is great and I do not understand it
regards
Re: Manual mode for processing video
Quote:
Originally Posted by danielvg
/usr/bin/php -q /home/username/public_html/cron.php
or it has to have as an end > /dev/null &
/usr/bin/php -q /home/username/public_html/cron.php
Is ok. But better have > /dev/null & at end of it (or you may get a mail everytime when the cron runs, depending on your server setup).
Quote:
Originally Posted by danielvg
I receive email messages saying
Running process.php
CRON: 1
That is fine.
Quote:
Originally Posted by danielvg
other way for newbies like me a button like it used to be would be fine :-)
Sorry..perhaps this is great and I do not understand it
CRONJOB is only needed for video import.
We will see if we can do video import work with and with out cronjob (like it worked in previous version). cron is added to as previous method fail to import/convert videos above 10 MB (depending on server configuration)
I'm doing something wrong
I think the settings are correct
but I can not make the video import
I've tried several times...and videos do not appear at homepage.
Anything I can be doing wrong?
Do u think is a good idea to ask for help at hostonnet?
Tip (can help) for youtube videos
Hello
You can do the following, (a little work while youtube code is known).
There's a German software, (visit http://www.ashampoo.com) for free that can search and download YTube videos in flv format to your computer. ClipFinder is freeware (you can expect a lot of ashampoo emails after register :-) )
Works with many major video portals.
With this tool you can download the video and after that uploading it to the folder (create it) "import" under templates_c
After you ftp the file go to admin, import folder, and the rest is piece of cake.
Hope it helps.
Regards
Re: Converting a lot of vids
Quote:
Originally Posted by nightmage
I am trying to use the cron to convert about 200 vids. It seems that each time the cron is kicked off, it sets 2 of the vids in the process queue to "start download". That is going to take forever!
cronjob will do one process at a time.
That is download a video or convert a video and add it to the site.
When it start downloading a video, its status is set to "start download", when finished, it will set to "finish download".
If you need to speed up the process, you need to run cron job more often, by default it run every 5 minutes, if you need you can run it every 1 or 2 minutes. But this will increase server load as processing video need a lot of CPU time and memory.
Quote:
Originally Posted by nightmage
Is there someway to set it to check if any of the vids have been set to "start download". If they have, then convert them first. If none of them are in the "start download" status, then get more vids...
This is done alternatively, that is if cronjob downloaded a video, next time it will convert a video if a video is available for convert, not not it will start next download.
Re: Setting cronjob for batch video processing
It seems problem with your server. You need to check with your web host to see why plesk is not running cronjob.
Re: Setting cronjob for batch video processing
Oh I got it sorted out.
I was putting in the values and then in the command line I was copying and pasting the command that you wrote for plesk users on the first page of the cron job tutorial. Basically because of that I was essentially unputting the values 2 times and therefore the error was coming up.
therefore on the command you should take off */5 ****
Re: Setting cronjob for batch video processing
Am trying to do this by command line on my server (no control panel)
My /etc/crontab looks like this:
#for vshare processing
*/3 * * * * /usr/local/bin/php -q /usr/local/www/data-dist/cron.php > /dev/null &
I keep getting the following error:
Sep 16 10:37:00 localhost /usr/sbin/cron[726]: (*system*) RELOAD (/etc/crontab)
Sep 16 10:37:00 localhost /usr/sbin/cron[726]: login_getclass: unknown class 'php'
Sep 16 10:37:00 localhost /usr/sbin/cron[726]: (*system*) PARSE (bad username)
Sep 16 10:37:00 localhost /usr/sbin/cron[726]: (process) ORPHAN (no passwd entry)
Any ideas what may be going wrong?
Re: Setting cronjob for batch video processing
sounds like something for admin to handle
Re: Setting cronjob for batch video processing
s25, try running the command on system prompt
/usr/local/bin/php -q /usr/local/www/data-dist/cron.php
The error seems some thing related to the system user that runs the cronjob. Which system user the cron job runs ?
Re: Setting cronjob for batch video processing
when you say system prompt you mean the cron jobs line? or the server command line?
Re: Setting cronjob for batch video processing
I think he means the command line, I am running it fine on the command line as root without an issue, How do I make it run as a cronjob using the command line?
Re: Setting cronjob for batch video processing
Code:
crontab -e -u username
Then it will open text editor like nano, pico or vi depending on your server. You need to enter the cronjob command in the editor and save it. After you add it, you can verify it with command
Code:
crontab -l -u username
Don't run it as user root. If you are loging in as root, just create a new user to run cron job.