Skip navigation.
Sponsors
Recent comments
Which modules use hook_cron?

Which modules use hook_cron?

14
May
2007

Drupal Grep

I recently needed to find out a list of modules which used hook_cron. I have SSH access to my server. Instead of writing a module (or using devel to execute some PHP) which returned the result of module_implements, I turned to Grep. Simple CD into your modules folder (can be the Drupal install, but you end up recursing through unlikely folders) and run this:

grep -R "^function.*_cron" *module

That will recursively search for all files with any lines that start with function, have anything between that occurrence of function and _cron. You can replace _cron with any hook name you like. I hope this is of use to someone else too.

The Drupal face came from a derrivative of Steven Wittens Wallpapers. If you'd like me to take it down Steven, please let me know - I didn't think you'd mind as there doesn't seem to be any CC license notes on the page in question. Nice wallpapers by the way!

It'd be nice if you asked before taking stuff from my site. Contact me at webmaster [at] thingy - ma - jig . co . uk

This site was based on the Cobalt 2.0 Theme for phpBB written by Jakob Persson

Search
Weblinks

Add to Technorati Favorites

TGC Webring

CMS Drupal Showcase

Feedburner for ThingyMaJig

View Nicholas Thompson's profile on LinkedIn

IconBuffet

Twitter