You could check global $user -- cron runs as anon. You could also check lock_acquire(&#39;cron&#39;, 240.0), which indicates cron is running. <div><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:06 AM,  <span dir="ltr">&lt;<a href="mailto:jeff@ayendesigns.com">jeff@ayendesigns.com</a>&gt;</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&#39;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 &#39;likes&#39; 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>