I'm currently having a problem getting this module to run from my crontab. It works and converts the video perfectly if I SSH to my directory and then type "php video_scheduler.php" once in my drupal root directory, but running from cron doesn't work. Here is the error I'm getting, my host is saying its an issue with the code. I've replaced my username with [usr]

Warning: include_once(./includes/bootstrap.inc): failed to open stream: No such file or directory in /home/[usr]/webapps/gleemanager/video_scheduler.php on line 48

Warning: include_once(): Failed opening './includes/bootstrap.inc' for inclusion (include_path='.:/usr/local/lib/php') in /home/[usr]/webapps/gleemanager/video_scheduler.php on line 48

Fatal error: Call to undefined function drupal_bootstrap() in /home/[usr]/webapps/gleemanager/video_scheduler.php on line 53

----
Here's the text of my cron job, my host has checked it twice to make sure the syntax is correct.

*/1 * * * * /usr/local/bin/php /home/[usr]/webapps/gleemanager/video_scheduler.php >> /home/[usr]/cron.log 2>&1

Thanks

Comments

heshanlk’s picture

Status:Active» Fixed

Please symlink to Drupal root (where index.php is exists).

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

navaneeth_r’s picture

Version:6.x-3.x-dev» 6.x-3.9

Hi

I am facing the same issue. I dont know much about symlink. How to do symlink to avoid the mentioned issue.

Thanks

mjlF95’s picture

Do you two happen to use Dreamhost? I was having this problem and after looking around I assumed it was Dreamhost specific. Here is the instructions on how to set up your Drupal cron job for Dreamhost. I did this and it fixed my problem. http://wiki.dreamhost.com/Drupal#Drupal_Cron_Jobs

heshanlk’s picture

Please symlink the video_scheduler.php

bboova’s picture

Been working on this all day and I just can't get it going...

Drush works fine, manually via ssh, but I can't get video_scheduler.php to run automatically with a cron job not matter what I try.

Does the symlink have to match all of the other root files' group and owner's? I have the chmod set at 777, so I don't think that that could be it.

Trying with Dreamhost web panel...any guidance would be great!

bboova’s picture

Following up in case my issue might help anyone in the future...

What seemed to be the problem was that the ogg video conversion kept failing because I needed to append the full '/usr/local/bin' path to the ffmpeg2theora command in the html5_ogv.inc file.

Best.

redhatmatt’s picture

wow. my mac clearly could run ffmpeg2theora no problem, I tested in command line in multiple ways all successful... but the watchdoglogs said no such item which i thought was some other issue... adding the full path to the command and ripping out the other parameters AND if I wanted to do multiple types all at one (flv, mp4 and ogg) I had to put the padding back to defaults cause flv does not understand the ogg friendly version... so in html5_ogv.inc my final, much shortened line is now:

      'command' => array(
        '/usr/local/bin/ffmpeg2theora --output !convertfile !videofile'

bah. thanks bryanboova.