- Accessibility
- Actions
- Blog
- Bootstrap
- Calendar
- Code Snippets
- Core Hacks
- Cron
- Development Environment
- Drupal 7
- Flash
- Forms
- Goodies
- Hooks
- Hosting
- Images
- Installation, Updating and Moving
- Internationalization
- Javascript/JQuery
- Learning Drupal (New Users)
- Login/User Management/Permissions
- Logs
- Menus
- Modules
- Nodes
- Paths
- Performance
- RSS
- Reference Sites
- Registry
- Reporting
- Reporting Bugs/Issues
- SEO
- Schema
- Search
- Security
- SimpleTest
- Sites
- Support
- Testing
- Themes
- Troubleshooting
- Upgrading
- User Groups
- Workflow
Submitted by captaindav on Sun, 2009-02-15 13:16
In the main Drupal directory is a php script "cron.php". This script should be run daily, or perhaps hourly for larger, more complex sites. Setting the script to run from the standard Linux cron may be problematic for some hosting configurations.
One way to run cron is as "php -q /path/to/Drupal/cron.php", for increased security. If this is successful, then simply place the following commands in your .htacess file: <Files "cron.php"> Order Deny,Allow Deny from all Allow from localhost Allow from 127.0.0.1 Allow from xx.xx.xx.xx <-- your IP address </Files> Often, however, this configuration causes errors which cron emails to the specified admin email address.
As a workaround, you can create a shell script and use the Lynx browser to call cron.php using http:
lynx -dump "http://example.com/cron.php" > cron_example.log Of course, this solution requires that your server have the Lynx browser installed.