Campaign won't appear as complete, until a new one is submitted

Hello,

I am working with 3.3.1 with PHP 7.0

I am experimenting a bit with cron-based campaigns. Queued messages are processed using the cron line:

12 00 * * * phplistusr /usr/bin/php /var/webs/campaign/www/admin/index.php -pprocessqueue -c/var/webs/campaign/www/config/config.php

I have created a small subscriber list for experimentation. It contains 6 mail addresses, one of which is fake.

I set the campaign to “Stop Sending After” a very short time (some minutes).

The problem I face is that although all 6 of the mail addresses are processed fine, and the 5 of them are delivered (as expected), the campaign won’t appear in the list of completed (“Sent”) campaigns until a new one is submitted. I have confirmed this multiple times, it always is like that. If I process multiple campaigns, the last one of them will remain active until a new one is submitted.

I can’t explain that. Am I missing something? Please advise!

Thanks,
Nick

@Appletech I think that phplist doesn’t mark a campaign as complete until the next run of processqueue after the last email is sent. If you use a cron job then you can run in quite frequently, say every few minutes, which should avoid your problem.

If you want to send campaigns only at certain times of day then use the embargo feature for that.

Thank you,

It seems you are right. I confirmed that “phplist doesn’t mark a campaign as complete until the next run of processqueue after the last email is sent”, as you describe.

Your suggested solution will work, but it’s not the best approach. When there are multiple users, we cannot guarantee when a campaign will be submitted, and we want to avoid sending such campaigns during normal work hours. Of course, we can use the technique of multiple process queue jobs only during the off hours, but still, it’s not very elegant.

I think that the correct behavior would be to mark a campaign as complete when the last mail has been sent or when the “Stop Campaign After” milestone has occurred, whichever occurs first.

Can phplist be configured to behave like that? If not, shouldn’t it?

Thanks,
Nick