Answers.Body: <p>You can use for this <code>drush</code> or <code>cv.phar</code>. Detailed instructions for either can be found here:</p>
  <p><a href="https://civihosting.com/blog/how-to-make-a-cron-job-for-civicrm/" rel="nofollow noreferrer">https://civihosting.com/blog/how-to-make-a-cron-job-for-civicrm/</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T13:27:45.967Z
Answers.LastActivityDate: 2022-01-05T13:27:45.967Z
Answers.UserDisplayName: Hershel
Answers.Body: <p>Try</p>
  <pre><code>/usr/local/bin/php /home/user/public_html/sites/all/modules/civicrm/bin/cli.php -u &lt;cpanel admin username&gt; -p &lt;cpanel admin password&gt; -e Job -a execute
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-07T16:56:54.850Z
Answers.Text: Iowa boys solution will not work as the cron file in no longer on that path in Drupal 9.
Answers.UserDisplayName: Tony Horrocks
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-30T04:04:47.643Z
Answers.LastActivityDate: 2021-10-30T04:04:47.643Z
Answers.UserDisplayName: Iowa Boy
Body: <p>I am trying to setup cron to run job.execute that I have setup in CiviCRM scheduled jobs. Drupal</p>
  <p><a href="https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#cron" rel="nofollow noreferrer">https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#cron</a></p>
  <blockquote>
  <p>Cron setup¶ In order for the scheduled jobs configured within the
  CiviCRM UI to run automatically, you'll need to configure a cron job
  which executes the Job.execute API call.</p>
  </blockquote>
  <p>I have seen other examples but...
  <a href="http://mydomain.com/sites/all/modules/civicrm/bin/cron.php" rel="nofollow noreferrer">http://mydomain.com/sites/all/modules/civicrm/bin/cron.php</a> as shown in other examples does not exist on my site.</p>
  <p>The only cron.php I have found is in the following location:
  /home/user/vendor/civicrm/civicrm-core/bin/cron.php</p>
  <p>My site is in this location
  /home/user/public_html/</p>
  <p>CiviCRM settings are in this location
  /home/user/public_html/sites/default/civicrm.settings.php</p>
  <p>using the crontab method what would the  be to execute my scheduled job?</p>
  <p>*/5 * * * * &lt;job.execute&gt;
  */5 * * * * job.execute
  */5 * * * * &lt;something_something_job.execute&gt;</p>
  <p>I know these are not correct, what is the correct command? These instructions were not specific on how to get this working unless I am missing something right in front of my face...</p>
  <p>Any help would be appreciated, thank you for your time!</p>
  
Tags: <cron><scheduled-job><drupal-9>
Title: Getting Cron to run scheduled jobs with Drupal 9 in cPanel
ThreadText: # Getting Cron to run scheduled jobs with Drupal 9 in cPanel
  
  (Asked by: username_0 on 2021-10-29)
  
  I am trying to setup cron to run job.execute that I have setup in CiviCRM scheduled jobs. Drupal
  
  <https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#cron>
  
  > Cron setup¶ In order for the scheduled jobs configured within the
  > CiviCRM UI to run automatically, you'll need to configure a cron job
  > which executes the Job.execute API call.
  
  I have seen other examples but...
  <http://mydomain.com/sites/all/modules/civicrm/bin/cron.php> as shown in other examples does not exist on my site.
  
  The only cron.php I have found is in the following location:
  /home/user/vendor/civicrm/civicrm-core/bin/cron.php
  
  My site is in this location
  /home/user/public\_html/
  
  CiviCRM settings are in this location
  /home/user/public\_html/sites/default/civicrm.settings.php
  
  using the crontab method what would the be to execute my scheduled job?
  
  \*/5 \* \* \* \* <job.execute>
  \*/5 \* \* \* \* job.execute
  \*/5 \* \* \* \* <something\_something\_job.execute>
  
  I know these are not correct, what is the correct command? These instructions were not specific on how to get this working unless I am missing something right in front of my face...
  
  Any help would be appreciated, thank you for your time!
  
  **Tags:** cron, scheduled-job, drupal-9
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2022-01-05. Score: 1
  
  You can use for this `drush` or `cv.phar`. Detailed instructions for either can be found here:
  
  <https://civihosting.com/blog/how-to-make-a-cron-job-for-civicrm/>
  
  
  ---
  
  ### Answer by username_2 on 2021-10-30. Score: -1
  
  Try
  
  ```
  /usr/local/bin/php /home/user/public_html/sites/all/modules/civicrm/bin/cli.php -u <cpanel admin username> -p <cpanel admin password> -e Job -a execute
  
  ```
  
  > **Comments:**
  > **username_3**: username_2 boys solution will not work as the cron file in no longer on that path in Drupal 9.  
  
  ---
  
  