Sorry, you said Drupal 6 -- use variable_get('cron_semaphore'). See <a href="http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_cron_run/6">http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_cron_run/6</a><div>
<br></div><div>The lock API is D7.<br clear="all"><div><br></div><font color="#333333">Carl Wiedemann</font><div><div><font color="#333333">Website design and development consulting</font></div><div><font color="#333333"><a href="mailto:carl.wiedemann@gmail.com" target="_blank">carl.wiedemann@gmail.com</a> | skype: c4rlww</font></div>
</div><br>
<br><br><div class="gmail_quote">On Fri, Sep 16, 2011 at 10:25 AM, Carl Wiedemann <span dir="ltr"><<a href="mailto:carl.wiedemann@gmail.com">carl.wiedemann@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
You could check global $user -- cron runs as anon. You could also check lock_acquire('cron', 240.0), which indicates cron is running. <div><div><br></div><font color="#888888"><font color="#333333">Carl Wiedemann</font><div>
<div><font color="#333333">Website design and development consulting</font></div>
<div><font color="#333333"><a href="mailto:carl.wiedemann@gmail.com" target="_blank">carl.wiedemann@gmail.com</a> | skype: c4rlww</font></div></div></font><div><div></div><div class="h5"><br>
<br><br><div class="gmail_quote">On Fri, Sep 16, 2011 at 10:06 AM, <span dir="ltr"><<a href="mailto:jeff@ayendesigns.com" target="_blank">jeff@ayendesigns.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><span style="font-family:Verdana;color:#000000;font-size:10pt"><div> I've been chasing the most annoying issue. I have a module that fires off XML when a video node is updated, in order to prepare the advertising that plays prior the video. The issue was that this process seemed to he inconsistent, and it turns out that a cron job that updates the Facebook 'likes' data is doing node saves, which triggers nodeapi with op=update just like saving a node via the node form. </div>
<div><br></div><div>I thought of adding a hidden field to the node form and testing for it, but I was wondering if there is an easier way to determine what is firing the hook, batch or user, process, something?</div><div>
<br></div><div>Jeff</div></span></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>