[development] D6 Cron mystery
nevets at tds.net
Tue Sep 27 18:52:34 UTC 2011
I would agree both those statements should cause a return when the code is trigged by cron.
What hook is the code in?
And the fact other values change should be a clue, what is changing that you do not expect to change?
> I have a module that hooks nodeapi and if an update has been performed on the correct content type, I create an XML file and transmit it.
> The problem is that the XML files were being created en masse, where normally an editor edits a single piece of content. The culprit has tentatively been identified as a cron run that updates each node with Facebook 'like' statistics, which performs a node save. Interestingly, some settings in the file end up being different...settings that should in no way be affected by what triggers the update, given that the node data used is not different in either case.
> I put the following line in the hook function:
> if (variable_get('cron_semaphore', FALSE) || user_is_anonymous()) return;
> I would think that a cron initiated trigger would fail for both conditions. It does not fail at all. I'm stuck!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development