Answers.Body: <p>If you want the jobs to execute at exactly the same time every day, swich it to disabled in the UI and then call that job with its params from a system crontab instead. We do this often for recurring contribution jobs e.g.</p>
  <p>Here's an example from one of our clients who in addition to executing the usual CiviCRM scheduled jobs mails out a report at a very specific time -&gt; params are: instanceId=44 and format=pdf (just like in the CiviCRM UI). Note that the <code>/usr/local/bin/vcv-production-all</code> (it's our way to call civicrm's <code>cv</code>) and <code>secureexampleca</code> is this site example and is specific to our docker set up - but crontab is not - it's a UNIX command.</p>
  <pre><code>5 * * * * /usr/local/bin/vcv-production-all api job.execute auth=0
  1 09 * * * /usr/local/bin/vcv secureexampleca api job.mail_report instanceId=44 format=pdf
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-12T13:10:59.177Z
Answers.Text: Thanks for tip. Would you please explain a bit what Param to set when setting up the system crontab?
Answers.UserDisplayName: Tapash
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-12T14:18:45.973Z
Answers.Text: I just stumbled upon this https://lab.civicrm.org/extensions/cronplus would this work You think?
Answers.UserDisplayName: Tapash
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-12T18:24:16.980Z
Answers.Text: ☝️ added to my answer
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-12T13:09:26.347Z
Answers.LastActivityDate: 2020-12-12T18:22:22.263Z
Answers.LastEditDate: 2020-12-12T18:22:22.263Z
Answers.UserDisplayName: KarinG - Semper IT
Body: <p>I have scheduled job (daily) to email a report to myself. I would like to receive it on a specific time everyday. Although I have set the time when it should run, every time it runs on a different time and keep getting moved forward 20-30 min ahead of when it ran yesterday.</p>
  <p>Is it an issue can be fixed easily? Thanks in advance.</p>
  
Tags: <email><reports><cron><cron-job><scheduled-job>
Title: Email report via cron gets moved every time it runs!
ThreadText: # Email report via cron gets moved every time it runs!
  
  (Asked by: username_0 on 2020-12-12)
  
  I have scheduled job (daily) to email a report to myself. I would like to receive it on a specific time everyday. Although I have set the time when it should run, every time it runs on a different time and keep getting moved forward 20-30 min ahead of when it ran yesterday.
  
  Is it an issue can be fixed easily? Thanks in advance.
  
  **Tags:** email, reports, cron, cron-job, scheduled-job
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-12-12. Score: 2 | Accepted answer
  
  If you want the jobs to execute at exactly the same time every day, swich it to disabled in the UI and then call that job with its params from a system crontab instead. We do this often for recurring contribution jobs e.g.
  
  Here's an example from one of our clients who in addition to executing the usual CiviCRM scheduled jobs mails out a report at a very specific time -> params are: instanceId=44 and format=pdf (just like in the CiviCRM UI). Note that the `/usr/local/bin/vcv-production-all` (it's our way to call civicrm's `cv`) and `secureexampleca` is this site example and is specific to our docker set up - but crontab is not - it's a UNIX command.
  
  ```
  5 * * * * /usr/local/bin/vcv-production-all api job.execute auth=0
  1 09 * * * /usr/local/bin/vcv secureexampleca api job.mail_report instanceId=44 format=pdf
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks for tip. Would you please explain a bit what Param to set when setting up the system crontab?  
  > **username_0**: I just stumbled upon this https://lab.civicrm.org/extensions/cronplus would this work You think?  
  > **username_1**: ☝️ added to my answer  
  
  ---
  
  