title: Cronjobs on Direct Admin is not working
body: <p>I created a cronjobs on direct admin, and if that running it will check curl =>>> change values in mysql. But it's not working. Please help me @@. Thanks
  This is my code:</p>
  
  <pre><code>    &lt;?php
  
  class ControllerVemaybayCronJobapp 
      {
  
  
  
              function index(){
              $connect = $this-&gt;connect();
              $query_routes_1 = $connect-&gt;query("SELECT * FROM **** where status = '0' GROUP BY routes ");
              for ($result = array();
              $row = $query_routes_1-&gt;fetch_assoc();
              $result[array_shift($row)] = $row);
  
              foreach ($result as $i =&gt; $aaa){
                  $routes = $aaa['routes'];
                  $detail_routes_2 = $connect-&gt;query("SELECT * FROM **** where routes = '" . $routes . "' AND status = '0' ");
                  for ($result2 = array();
                  $row2 = $detail_routes_2 -&gt;fetch_assoc();
                  $result2[array_shift($row2)] = $row2);
  
                  foreach ($result2 as $t =&gt; $value1) {
  
                      $ngay = $value1['ngay'];
                      $thang = $value1['thang'];
                      $nam = $value1['nam'];
                      $min = $value1['minPrice'];
                      $max = $value1['maxPrice'];
                      $providers = $value1['providers'];
                      $startdate = $nam.$thang.'01';
                      $enddate = $nam.$thang.'31';
  
                      $bien = $this-&gt;getlist_ticketsofdate($routes,$startdate,$enddate);
                      foreach ($bien as $k =&gt; $value) {
                          $moi2 = array();
                          $moi = $value['c'];
                          $moi2 = $value['f'];
                          if($value['_id']['dim'] == $ngay ){
                              if($min &lt;= $value['c'] &amp;&amp; $value['c'] &lt;= $max &amp;&amp;  strpos($providers, $value['p']) !== false){
                                  $connect-&gt;query("UPDATE **** SET status='1' where customer_id = '" . $value1['customer_id'] . "' ");
                                  break;
                              }else{
                                  foreach ($moi2 as $key =&gt; $value2) {
                                      if($min &lt;= $value2['cp'] &amp;&amp; $value2['cp'] &lt;= $max &amp;&amp; strpos($providers, $value2['p']) !== false){
                                          $connect-&gt;query("UPDATE **** SET status='1' where customer_id = '" . $value1['customer_id'] . "' ") ;
                                           break;
                                      }
                                  }
                              }
                          }
                      }
                   }
              }
          }
  
  
          function connect(){
              $servername = "****";
              $username = "****";  
              $password = "****";  
              $databasename = "****"; 
              $conn = new mysqli($servername, $username, $password,$databasename);
              if ($conn-&gt;connect_error) {
                  die("Connection failed: " . $conn-&gt;connect_error);
              } 
              return $conn;
          }
  
  
  
          function getlist_ticketsofdate($diadiem,$startDate,$endDate){
  
  
              $url = '****';
  
              $providers = array();
              $providers[0] = '****';
              $providers[1] = '****';
              $providers[2] = '****';
  
              $routes = array();  
              $routes[0] = $diadiem;
  
              $headers = array();
              $headers[] = 'Content-Type: application/json';
              $headers[] = 'Connection:keep-alive';
  
              $param = array(
                  'startDate' =&gt; $startDate,
                  'endDate' =&gt; $endDate,
                  'minPrice' =&gt; '0',
                  'maxPrice' =&gt; '700000',
                  'providers' =&gt; $providers,
                  'routes' =&gt; $routes,
                  'type' =&gt; 'date',
              );
  
              $data_string = json_encode($param);
  
              $ch = curl_init();
              curl_setopt($ch, CURLOPT_URL, $url);                                                                 
              curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);      
              curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
              curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  
              $response = curl_exec($ch);
              $result_tickets = json_decode($response,true);
              return $result_tickets;
          }
  }
  ?&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/6cEiy.png" rel="nofollow noreferrer">This is my cronjobs</a></p>