I have noticed on a site that I have begun setting up that if I have some primary links pages with custom PHP that calls " drupal_goto" then it will interrupt the cron process and keep it from running properly.

I had noticed this earlier when I was using a primary link page to redirect to an event type within the event module, but I have just created a page that redirects to another node page and it does the same thing.

To produce this error.

Install Drupal 6.
Enable PHP filter.
Create a test page, fill it with anything you want. Remember which node # it is.
Create another page with a menu to primary links (I am using Garland) which has the following code:

<?php
 drupal_goto('node/xxx'); (where xxx is the node # of the page you just created.)
?>

Now go and try to run cron. It will load up that primary link and not run cron.

I marked this as critical due to the importance of cron running regularly. If I am in error please let me know the proper way to load up those other pages. Keep in mind I am using the drupal_goto method to load up specific events in the event module, and have read that this is the best way to do it...

Comments

gábor hojtsy’s picture

Priority: Critical » Normal
Status: Active » Closed (works as designed)

Well, your code can always be wrapped into a check on whether it is running on cron.php or on the live site. I am not sure what Drupal could do here. You can also use exit; in your PHP nodes which would quit/halt the cron process as well, or any number of other creative things with your PHP nodes.

cjeanson’s picture

Considering I don't know PHP, I really don't know how to accomplish this at all. Anyone have an online resource that explains how to do any of these suggestions?

Without Views I don't see any recommended way of accomplishing this. Rats.

cjeanson’s picture

Nevermind, this fixed it:

http://drupal.org/node/102138