mel47 Posted September 25 Share Posted September 25 Hi, I read and re-read the page about lazycron but there is something I really don't understand. Where I should put this function? Does the hook and the function should be on the same page? Does the template should be a page related to the function? Or I should create a template specifically for this? But if so, I guess this template have to be published and visited? My goal is to send an email weekly. Thanks! Link to comment Share on other sites More sharing options...
monollonom Posted September 25 Share Posted September 25 It depends on what you want to achieve but basically with lazycron you specify a time interval target and whenever someone loads a page the lazycron checks if the interval has passed and then triggers its function. This means that depending on where you put the hook, it may check more often or not: if you put the code in a template, then the lazycron is checked only when a guest is visiting a page with this template. However if you put the hook in init.php (or ready.php) then the lazycron will be checked for every pageview, even the admin ones. 4 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now