By Dan Silver on
I have looked and I can't seem to find the answer anywhere.
I have a function called formpractice_send_message() that should be ran every hour. I have poormanscron set up to run every hour.
I found this page:
http://api.drupal.org/api/function/hook_cron , but it didn't have an example and I don't understand it.
So mu question is, how do I format this function to be ran every hour?
Thank you very much!
Comments
Hello Silverd, I believe you
Hello Silverd,
I believe you have misunderstood the hook functionality.
The "hook_cron" allows you to execute some code when the cron.php is executed. Thus, you don't have any way of executing that code "every hour".
However, it seems that you are the administrator of your site, and thus can can make the cron.php be run every hour.
So your answer will be like this: create a function called "formpractice_cron". The code that you write inside that function will be executed every hour (because you are running cron.php every hour).
Hope this helps! :-)
Regards,
Sergio
thanks
I got it working perfectly.
I used poormanscron to run cron every hour and the module now works.
Thanks!!!!!