<div class="container">
<div class="col text-center">
<button id="click" class="btn btn-danger">Jquery Auto Click</button>
  </div>
   </div>
.container{
padding-top:50px;
}
//Tutorial by Eddie Kidiw
//https://www.eddiekidiw.org
$(document).ready(function(){
 $('#click').click(function(){
        alert('button clicked');
    });
  // set time out 5 sec
     setTimeout(function(){
        $('#click').trigger('click');
    }, 4000);
});

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.2/css/bootstrap.min.css

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js
  2. https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.2/js/bootstrap.min.js