I am trying to find a simple solution to my problem in setting up a cron job for a Drupal site. The hosting service provides only a primitive method for creating scheduled tasks: it will load a given web page at a chosen frequency. The problem lies in the fact that the web address can only take the following form:
username.hostingservice.tld/chosen-directory/chosen-file.htm
while the domain name of the site is example.com and exists in Drupal as part of a multi-site setup (not default).
Configuring cron using username.hostingservice.tld/example.com/cron.php does not work. Typing that address into the browser will cause Drupal to attempt a fresh installation based on settings.php in the "default" directory of the multi-site setup.
What is the simplest and most effective solution here? One condition I have is that I want to be able to use the scheduled tasks interface provided by the hosting company, to make life easier for future web masters of the site.
Could I just delete the "default" directory? Should I make a symlink so that this directory points to the "example.com" directory? Is there an instruction in .htaccess that deals with this? Any suggestions would be most welcome.
Comments
meta refresh in a php file
Something like:
<?php header("location: something.example.com/cron.php")Have fun and check my Drupal Profile: http://drupal.org/user/519
The redirect method did not
The redirect method did not work for me. It seemed like an elegant solution, but only resulted in the following error report: "Warning: Cannot modify header information - ".
Problem solved
Thank you vwX, I now have the solution I need. The reason the meta refresh was not working before, was because of white space before or after the opening and closing PHP tags.