automatic scheduling

vladimirKobi

New Member
Hi @twisted1919

i have a question,
i want every morning to scheudle lets assume 10 campaigns,
i would like to mailwizz to send one after another, but i dont want to sit all day and hit resume when a campaing is finished just to send one in a time.

i scheduled them all for the same time, and limited - "Campaigns at once *" to - 1.
but when 1 campaign is processing, the next after it is sending.

is there a way to wait untlii the 1st campaing i scheduled and only then send the 2nd one?
 

twisted1919

Administrator
Staff member
I think setting campaigns at once to 1 should do what you are after, not sure why it does not work, are you using pcntl sending?
 

twisted1919

Administrator
Staff member
Ok, so here's what i think it happens.
You schedule one campaign at a time, and the cron job runs once a minute, so when it runs, you have 10 campaigns for sending, but it only picks one of them, so it sends the batch of subscribers in 40 seconds, then it finishes and waits the next cron job. next cron job runs and processing starts again.
Now, let's assume that processing a batch of subscribers takes more than 40 seconds, say 90 seconds. In this case, the cron job runs, selects the first campaign and processes it which takes 90 seconds. But since the cron job runs each minute, when it will run again next minute, it will skip the first campaign, since it is already processing, and it will select another one and start processing it.

So i think you have two options here:
1. Lower down the number of subscribers at once in such way that they finish sending in under one minute.
2. Move the cron job for sending campaigns, instead of each minute, put it to run once at 10 minutes or so.

None of the above are optimal though... BUT when using pcntl, we use a global lock on the campaigns, so if you have php's PCNTL extension enabled on your server and you use these settings:
Screenshot 2017-03-27 12.22.35.png
It will work absolutely as you want it to work ;)
P.S: (subscribers at once can be whatever you have, what is important is the PCNTL settings and the number of campaigns at once).
 

vladimirKobi

New Member
ok, so i do have the PCNTL extension on my server,
i enabled it on mailwizz parallell sending, and while one campaign is sending, i resumed the one after it, and all of a sudden, the 1st one became processing, and the 2nd start sending.

this is'nt what i wanted...:)
 

twisted1919

Administrator
Staff member
Hmm, i could not reproduce this. Keep in mind that if a campaign stays for too long in processing it means it's stuck and it will be skipped when the cron job runs, so you have to adjust your sending settings to avoid this issue.
Can you try with a very low number of subscribers at once and gradually increase it ?
 

vladimirKobi

New Member
ok, ill try simpify things here -
i have scheduled two camapgins of 100K subscribers approx' each.
i have the following configuration:
SETTINGS -> CRON:
Campaigns at once =1
Subscribers at once=110
Send at once =110
Emails per minuet = 110
SETTINGS -> CUSTOMERS->CAMPAIGNS:
Subscribers at once= 110
Send at once =110
Emails per minute =110

Parallel sending via PCNTL is enabled.
Campaigns in parallel=1
Subscriber batches in parallel=1


and it's still does'nt work. you told me to "adjust my sending settings to avoid this issue"
which settings should i cahnge? what should i do next?
 
Last edited:

twisted1919

Administrator
Staff member
@vladimirKobi - the way i advised you to do it should work just fine, the only reason why it won't work is if pcntl doesn't exist on your server, but we can check this just fine:
Go to Backend > Misc > PHP Info and search in page for pcntl, you should see this:
Screenshot 2017-03-28 13.03.49.png
This means pcntl is enabled in the web interface.

Next, we need to see if it is enabled in command line, this is a bit tricky, but from ssh/command line, you should run the command:
/usr/bin/php -m | grep pcntl
Instead of /usr/bin/php you should use the path to PHP that you have added in your cron jobs.
In my case, this is what i get:
Screenshot 2017-03-28 13.07.05.png
This means pcntl exists on my server.

I get that all the above might seem complicated, but there's no other way, that's how PHP works sometimes, unfortunately.

Now, do the same and let me know what you get.
 

twisted1919

Administrator
Staff member
@vladimirKobi - That looks perfectly fine :confused:
PM me with backend login to the app and ssh access so that i can check a few things.
(i'm currently busy with some otehr task, will take a while till i can check this)
 
Top