The path_uri() function, which is now used does not contain a value if called as part of a shell script like this:

#!/bin/sh
cd www
/usr/bin/php -q cron.php
cd ..

I've worked around it by replacing the path_uri() with a hardcoded variable. Not sure if this will affect many people.

Comments

Anonymous’s picture

I'm not sure, but try setting the environment variable REQUEST_URI to the path to your web site. Exactly how this is done depends on your operating system.

Anonymous’s picture

Component: Code » Documentation

Making this a documentation issue.

ax’s picture

the documentation (http://drupal.org/node.php?id=288) mentions that cron needs certain environment variables and therefore should be run from a web browser. marking this as fixed.

ax’s picture