The batch_example.module in <a href="http://drupal.org/project/examples">Examples project</a> may be helpful.<br><br>-Randy<br><br><div class="gmail_quote">On Wed, Jun 9, 2010 at 1:25 PM, Jeff Greenberg <span dir="ltr"><<a href="mailto:jeff@ayendesigns.com">jeff@ayendesigns.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;" bgcolor="#ffffff" text="#000000">
<p style="margin-bottom: 0cm; margin-top: 0pt;">Have a module function
hooking batch:</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"> $batch = array(<br>
'operations' => array(<br>
array('mymodule_batch_task', array($var1, $var2)),<br>
),</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"> 'finished' =>
'mymodule_batch_finished',<br>
'title' => t('batch process'),<br>
'init_message' => t('starting.'),<br>
'progress_message' => t('Processed @current out of @total.'),<br>
'error_message' => t('encountered an error.'),<br>
'file' => 'mymodule.admin.inc',<br>
);<br>
batch_set($batch);<br>
<br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">The batch process
messages appear on the screen as they should, but it seems that the
operations function doesn't fire at all. I put a watchdog command
before the above call, and it appears in the dblog report. I put a
watchdog call at the beginning of mymodule_batch_task() and it doesn't
show up, and neither does the watchdog call from the 'finished'
function.</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">Jeff<br>
</p>
<div>-- <br>
<p style="margin-bottom: 0in;"><img src="cid:part1.02050601.06030002@ayendesigns.com" name="ayenlogo" valign="top" align="LEFT" border="0" vspace="14"><font style="font-size: 8pt;" size="1">Ayen Designs </font><font face="Times New Roman, serif"><font style="font-size: 8pt;" size="1">
<br>
388 Bullsboro Drive #105 · Newnan, Georgia 30263</font></font>
<br>
<font face="Times New Roman, serif"><font style="font-size: 8pt;" size="1">404-271-9734<br>
<a href="http://ayendesigns.com" target="_blank">ayendesigns.com</a><br>
IM (Yahoo) baalwww (MSN) <a href="mailto:baalwww@yahoo.com" target="_blank">baalwww@yahoo.com</a><br>
Skype: ayendesigns
<br>
<br>
Ayen Designs is a tradename of the computer services division of <img src="cid:part2.01010608.05040506@ayendesigns.com" name="acmelogo" align="absmiddle"></font></font></p>
</div>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Randy Fay<br>Drupal Module and Site Development<br><a href="mailto:randy@randyfay.com">randy@randyfay.com</a><br>+1 970.462.7450<br><br>