Great, as we pointed out, on the drupal site itself, there are a lot of tutorials also; if Search is enabled and it works, you know cron is running well.<br><br><div><span class="gmail_quote">On 3/9/07, <b class="gmail_sendername">
RJ</b> <<a href="mailto:ryanfirst@sympatico.ca">ryanfirst@sympatico.ca</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Tutorials:</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"><a href="http://promosearch.atomz.com/search/promosearch?sp-a=sp1000a5a9&sp-f=ISO-8859-1&sp-t=general&sp-k=Articles%7CBooks%7CConferences%7COther%7CWeblogs&sp-x-1=cat&sp-q-1=ONLamp&c=ONLamp&sp-p-1=phrase&query=cron&sp-q=cron&search=Go" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://promosearch.atomz.com/search/promosearch?sp-a=sp1000a5a9&sp-f=ISO-8859-1&sp-t=general&sp-k=Articles%7CBooks%7CConferences%7COther%7CWeblogs&sp-x-1=cat&sp-q-1=ONLamp&c=ONLamp&sp-p-1=phrase&query=cron&sp-q=cron&search=Go
</a></font></div>
<div><font face="Arial" size="2"></font> </div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"><span class="q">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b>
<a title="neil@esl-lounge.com" href="mailto:neil@esl-lounge.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Neil:
esl-lounge.com</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="support@drupal.org" href="mailto:support@drupal.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
support@drupal.org</a> </div></span><div><span class="e" id="q_1113762518c1f7b1_2">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Friday, March 09, 2007 9:40
AM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> Re: [support] Setting up cron
job for user role updates</div>
<div><br></div>
<div><font face="Arial" size="2">Victor and Greg, </font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Thanks for your help.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Just for your information, I am setting up a
non-ESL site on Drupal, so this isn't for the site you saw Victor.
</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">My host has a cron job section of the control
panel, so that doesn't seem as if it will be too difficult.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">I am now looking into getting my first ever
crontab set up just so I can see it working, then I'll worry about setting up
the script itself to update user roles. I have never set up a cron job before
so I am taking baby steps, where to put the script, where to set up the
schedule. There seems to be a lack of "Cron Jobs for Idiots" type tutorials on
the web, but I'll keep lookiing.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">That DB Cron module looks very useful Greg,
although it's not available in 5.1.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">I'll keep looking into this and thank you both
once again.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Neil</font></div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b>
<a title="victorkane@gmail.com" href="mailto:victorkane@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Victor
Kane</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="support@drupal.org" href="mailto:support@drupal.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
support@drupal.org</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Friday, March 09, 2007 12:29
PM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> Re: [support] Setting up cron
job for user role updates</div>
<div><br></div>It's always been my wish to run an ESL site!<br>I taught ESL
for many years until getting into IT in the late eighties. My whole purpose
of getting into IT was to seek help for my teaching academy, but once in the
new realm, I was caught up entirely by it :) <br><br>So I certainly would
like to help you.<br><br>Running cron is part of the realm of the operating
system, outside of Drupal.<br><br>Your hosting company will allow you to
edit cron via a panel; they may force you to edit cron directly through text
you enter, or they may have some kind of interface to make life easy for
you. <br><br>If that is not the case, then you will have to fill in
something like the following:<br><br># m h dom mon dow
command<br>0 3 * *
* wget -O - -q <a href="http://mentor/drupal/cron.php" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mentor/drupal/cron.php
</a><br><br>Please see the excellent documentation on the Drupal site at <a href="http://drupal.org/cron" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://drupal.org/cron</a> which explains all
and gives alternatives to wget. There are also instructions for certain
hosting companies like Dreamhost, etc. Check out the comments at the bottom
of the page for some illuminating explanations. <br><br>Drupal has a
poormanscron module, but I would recommend running cron
directly.<br><br>Once you have done this, you can now enable the core search
module which will index your site, and you will be able to supplement the
pearl script you are currently using with Drupal's powerful built-in search
facilities. <br><br>You should do this first, at least for testing purposes,
to make sure you have cron running.<br><br>For your second step, you need to
write a module which implements <br>The file cron.php invoked by cron calls
<a href="http://api.drupal.org/api/5/function/drupal_cron_run" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://api.drupal.org/api/5/function/drupal_cron_run</a>
and this some housekeeping and then invokes all module implementations
of hook_cron().<br><br>The search module, for example, does the
following:<br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/**</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
* Implementation of
hook_cron().</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> *</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
* Fires hook_update_index()
in all modules and cleans up dirty words (see </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> * search_dirty).</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> */</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">function search_cron()
{</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> // We register a shutdown
function to ensure that search_total is always up</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> // to date.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">
register_shutdown_function('search_update_totals');</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> // Update word
index</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> foreach (module_list() as
$module) {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
module_invoke($module, 'update_index');</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
}</span><br style="font-family: courier new,monospace;"><br>You would need to write a
module which, in its modulename_cron() function effectively iterates over
the users and carries out the changes you propose.<br><br>Cheers,
<br><br>Victor Kane<br><a href="http://awebfactory.com.ar" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://awebfactory.com.ar</a><br><br>
<div><span class="gmail_quote">On 3/9/07, <b class="gmail_sendername">Neil: <a href="http://esl-lounge.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">esl-lounge.com</a> </b><<a href="mailto:neil@esl-lounge.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
neil@esl-lounge.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Here is my wish: to run a cron job a few
times a day to update all Authenticated Users to Full Members once they
have posted five comments/forum posts.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">My plan is to have all comments posted by
Authenticated Users moderated but move users up to the Full Members role I
will create to cut down on moderation work. How would I go about doing
this? Is there any documentation on <a href="http://drupal.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">drupal.org</a> about setting up
cron jobs? There don't seem to be any modules to allow this. Userpoints
exists but isn't free. A simple cron job seems to be the easiest solution
all round. Has anyone else put something like this in place?</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Neil</font></div></div><br>--<br>[ Drupal
support list | <a href="http://lists.drupal.org/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.drupal.org/</a>
]<br></blockquote></div><br>
<p>
</p><hr>
<p></p>-- <br>[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.drupal.org/</a> ]<p></p></blockquote></span></div>
<p>
</p><hr>
<p></p>-- <span class="q"><br>[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.drupal.org/</a>
]</span><p></p></blockquote></div>
<br>--<br>[ Drupal support list | <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br>