Documentation about plugin hooks: http://learn.elgg.org/en/1.x/design/events.html#plugin-hooks
Check also the garbagecollector and logrotate plugins for examples on how to use cron with plugin hooks.
what crons i need, i am trying to limit every plugin
Some explanation - not a ready solution!
Setting up the cronjobs on the server does nothing regarding limiting the emails as such. The cronjobs getting executed (per minute, fivemin, etc.) is just a requirement to be able to queue emails at all.
What you would have to do by writing a plugin hook is collecting all emails (more precisely: notifications and messaged by "mail" method) and prevent them from getting sent immediately. You have to queue up all collected emails and then send them (via a cron plugin hook) on the next execution of the cronjob you decided to use - but of course send a number of X emails at once. For example you could decide on using the 5 min cronjob, i.e. each time this cronjob is triggered (if configured on the server), a maximum number of X emails is sent from the emails that have queued up.
It's not a trivial task to get this implemented:
Elgg 1.9 will queue notifications and messages and send them out by cronjob together (but I think there's no option implemented to limit the maximum number of mails sent and it's maybe quite difficult to backport this new notification handling to Elgg 1.8).
Emails from account registrations will most likely also be the least of the problems regarding the number of mails sent. By default, email sending is enabled in the notifications settings of Elgg for new accounts. The number of mails sent for example due to comments made on content will surely be much higher than from account registering. A plugin to turn off the mail method by default is the SetNoNotifications plugin (https://community.elgg.org/plugins/869366/1.8.2/elgg-1819-set-no-notifications). This will reduce the number of mails if your users don't turn on the mail method again (rather unlikely for all). Still they are not denied from turning it on again. For preventing them from turning on the email sending as available notification method you would have to override the default notification settings view via a customized plugin to remove the mail method as a notification method offered to your users.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.