Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
(not verified) CreditAttribution: commentedI'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.
Comment #2
(not verified) CreditAttribution: commentedMaking this a documentation issue.
Comment #3
ax CreditAttribution: ax commentedthe 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.
Comment #4
ax CreditAttribution: ax commented