automatic scheduling

Discussion in 'General discussions' started by vladimirKobi, Mar 27, 2017.

  1. vladimirKobi

    vladimirKobi New Member

    Joined:
    Feb 8, 2017
    Messages:
    24
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    2
    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?
     
  2. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    9,980
    Likes Received:
    2,338
    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?
     
  3. vladimirKobi

    vladimirKobi New Member

    Joined:
    Feb 8, 2017
    Messages:
    24
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    2
    nope, dont know what is pcntl
     
  4. vladimirKobi

    vladimirKobi New Member

    Joined:
    Feb 8, 2017
    Messages:
    24
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    2
    what should i do? is there any other solution?
     
  5. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    9,980
    Likes Received:
    2,338
    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).
     
  6. vladimirKobi

    vladimirKobi New Member

    Joined:
    Feb 8, 2017
    Messages:
    24
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    2
    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...:)
     
  7. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    9,980
    Likes Received:
    2,338
    With the settings above like i shown you ?
     
  8. vladimirKobi

    vladimirKobi New Member

    Joined:
    Feb 8, 2017
    Messages:
    24
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    2
  9. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    9,980
    Likes Received:
    2,338
    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 ?
     
  10. vladimirKobi

    vladimirKobi New Member

    Joined:
    Feb 8, 2017
    Messages:
    24
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    2
    can we skype call by any chance?
    or skype chat?
     
  11. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    9,980
    Likes Received:
    2,338
    Unfortunately no, support is offered only via forums/support tickets so that other can benefit from the solutions we find ;)
     
  12. vladimirKobi

    vladimirKobi New Member

    Joined:
    Feb 8, 2017
    Messages:
    24
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    2
    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: Mar 28, 2017
  13. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    9,980
    Likes Received:
    2,338
    @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.
     
  14. vladimirKobi

    vladimirKobi New Member

    Joined:
    Feb 8, 2017
    Messages:
    24
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    2
    i've done it already, and pcntl workes 100%
    upload_2017-3-28_14-38-28.png
    upload_2017-3-28_14-38-48.png
    @twisted1919
     
  15. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    9,980
    Likes Received:
    2,338
    @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)
     
  16. vladimirKobi

    vladimirKobi New Member

    Joined:
    Feb 8, 2017
    Messages:
    24
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    2
    great, sent!
    thanks
     
  17. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,694
    Likes Received:
    675
    S.E:
    2019-05-17 04:02:46
    L.T:
    Regular
    L.C:
    7
    What was found to be the reason?
     
  18. GregKevey

    GregKevey New Member

    Joined:
    Dec 29, 2018
    Messages:
    18
    Likes Received:
    0
    S.E:
    2019-06-29 11:20:31
    L.T:
    Regular
    L.C:
    1
    please explain the reason.
     

Share This Page