Get answers quicker by searching

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

  • Ben June 2013
Sending campaign on server without cron support
  • I would like to show a solution I found to fix my problem. Since my server do not support Cron. All the time the campaign was freezing every 300/400 sent emails. And I had to reload and click in "continue". I made this.

    In file "app.php":

    before the first(line 223):

    $(document).ready(function() {

    add this:

    var _howitwas = "";var _changed = 0;var f_url = $("#continue-sending-text > a:first").data("url");var f_campaign_id = $("#continue-sending-text > a:first").data("id");var f_email_list = $("#continue-sending-text > a:first").data("email_list");var f_app = $("#continue-sending-text > a:first").data("app");var f_offset = $("#continue-sending-text > a:first").data("offset");

    And replace the code:

    else refresh_interval = setInterval(function(){get_sent_count('.$id.')}, 2000);

    for:

    else{ if(_howitwas == ""){ _howitwas = data;}else{if(_howitwas == data){_changed++;if( _changed > 10 ){_changed = 0;$.post(f_url, { campaign_id: f_campaign_id, email_list: f_email_list, app: f_app, offset: f_offset },function(a){});}}else{_changed = 0;_howitwas = data;}}refresh_interval = setInterval(function(){get_sent_count('.$id.')}, 2000);}

    Done!

    Well, it helped me alot :)

  • 1 Comment
  • Vote Up0Vote Down BenBen
    Posts: 3,489Sendy support

    @ConceitoDigital

    Thanks for sharing.

    If your server does not support cron, you can try setting up a cron job using an external service instead http://forum.sendy.co/discussion/328/can-i-run-cron-jobs-from-an-external-service-/p1

    This way, you don't have to edit Sendy's core code.

    Thanks.

    Ben

This discussion has been closed.
All Discussions