Automatic Email notification everyday

ahmedo

Member
Hi,

I need to send an automatic notification every day at 10 AM to a list of names and emails that are stored in a list to remind them of checking their activities. Is that difficult to do?

Thanks.
 
Yes and no.

We have an 'email' scheduled task (cron) plugin, which can do that.

The tricky part is getting it to run at the right time. The problem being that J! doesn't have a scheduler, as "real" scheduling is an OS dependent task. We fake it, by having our "Fabrik Schedules Task" system plugin run on every (front end) page load, as the last thing J! runs ("onAfterRender"). We then check in our fabrik_cron table to see if there's any tasks to run. But of course, that relies on your site being loaded by someone. If nobody hits your front end till (say) 11am, then the task won't run till then.

The best way round this is to set up your own 'cron' task in your OS. So in Linux, a 'cron' job. Which you can either do by hand on a command line, or if you have CPanel, there's usually a way of setting up a scheduled task there. Or there are third party web sites that let you set up tasks. And your task should be a "wget http://your.site/index.php?fabrik_cron=YOURSECRET". The wget commad is a UN*X command line to fetch a web page.

Then in your email cron plugin, one of the option is "query string secret", which you should set to "YOURSECRET" (well, not literally, but you know what I mean ... just pick a random secret word). What that does is says "only bother running this task if the page load contains this secret word.

-- hugh
 
Thanks Hugh for the reply.

All I wanted was an email to be sent every morning telling everyone in a particular list, please check your sales activities. I may even dare to add a link to all sales leads that have no activities. At the moment, a simple email will do, irrespective whether a page or the portal is visited or not.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top