• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Best practice, send to private list once with scheduled email plugin

wouter.galia

New Member
Hi

I use the scheduled email task plugin to send to a list. The list should only be accessible by doctors because the information in the list is confidential. One of the biggest problems that I encounter is that emails are sent multiple times. I can not replicate this problem, all my personal tests work fine. The ?sent? field is updated when sent, because of the condition (only if not sent) the email only goes out once.

However when running live with allot more activity and a cron every 15 min almost all emails are sent more than once (up to 8 times). Every email contains a direct login link to see personal reports. Could it be that the cron is triggered multiple times before knowing that the ?sent? field is updated?

It is difficult to understand the cause because the problems are not very consistent. Can you give me some advice on what the best practice would be to avoid these problems?
 
Also, are you running the cron on a copy of the list that pre-filters on your 'sent' field?

One common problem with cron tasks is the size of the dataset. When we do the row selection for a cron job, we don't do any pagination, so it'll select the whole table, subject to whatever pre-filters are on your list. That can result in very long processing times, if you have thousands (or tens of thousand, or ...) of rows.

What I recommend is copying your List, and setting a pre-filter on that, to filter out your 'sent' rows.

And to expand on the "run gating". With that enabled, we won't start another run of the cron job if there is already one running. May not be your problem, with a 15 minute run, but could be if you have a lot of rows. So what could be happening is that one task starts, takes more than 15 mins to run, another one starts, etc. And because we only update the "sent" field in a single query once all row processing is done, it's possible more than one task could send the same email. By setting run gating, you make sure that won't happen.
 
Thank you, this really helps. I created a new list with an extra prefilter on 'sent' and activated run gating. I will report back when the next batch is sent out.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top