Depends on what exactly you want to clear. If you just need to empty the
user/node tables or reset the site theme, it's fairly straight-forward - just
put a few "DELETE" statements in the hook_cron implementation.
Re-installing the entire site would be tricky to do via a module inside the site
itself ("cutting off the branch you're sitting on"). In that case, you would be
better served by a batch script started by a separate cron-job outside the
Drupal site.
> 2009/3/7 sivaji j.g <sivaji2009@gmail.com <mailto:sivaji2009@gmail.com>>
Robrecht Jacques wrote:
> Write a module that implements hook_cron().
>
-->
> Hello geeks,
>
> Most of the drupal modules has test site programmed to clear
> database after a regular interval, i would like to know how it
> works. I want to do the same for drupal quiz module demo site, The
> demo site has been hosted at bluehost which has cpanel where i have
> options to write my own cron and run it, but i have no idea on how
> to use it for this purpose. Any suggestions and criticisms
> regarding this will be appreciated.
>
> --
> Thanks a lot
> -----------------------------------------
> http://ubuntuslave.blogspot.com/
>
>
eternity lies ahead of us, and behind.
have you drunk your fill?
* * *
PGP: http://ermarian.net/downloads/0x27CA5C74
XMPP: arancaytar.ilyaran@gmail.com
AOL: 282026638 @icq / RealArancaytar @aim
URL: http://ermarian.net