Answers.Body: <p>I had difficulties getting cron.php to log progress and, as the issue was on a remote server would have difficulties debugging.  As a consequence, I rolled the CiviCRM installation and database back to backups taken before the issue occurred, and then reinstalled the CiviCRM upgrades.  The cron job now appears to be working.  Fortunately, the problem was on a test system so it didn't matter about any recent work.  Had it been on a live system, it the issue would have been much more serious.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-13T10:50:38.263Z
Answers.LastActivityDate: 2019-11-13T10:50:38.263Z
Answers.UserDisplayName: Stephen Palmstrom
Answers.Body: <p>It doesn't answer why it stopped working, but have you tried using <a href="https://github.com/civicrm/cv" rel="nofollow noreferrer"><code>cv</code></a> in your cron job?  Works for me.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-14T09:46:37.003Z
Answers.Text: I haven't yet, but it is worth investigating.
Answers.UserDisplayName: Stephen Palmstrom
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-24T11:40:05.090Z
Answers.Text: I started using cv, and it seems to be working better.
Answers.UserDisplayName: Stephen Palmstrom
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-10T11:51:47.897Z
Answers.LastActivityDate: 2020-01-10T11:51:47.897Z
Answers.UserDisplayName: Aidan
Body: <p>I am involved with three CiviCRM instances, a live one under LAMP, Joomla 3.9.13 and CiviCRM 5.18.2, a test one under LAMP, the same Joomla version and CiviCRM 5.18.4 and a development environment running under Windows 10, IIS, the same Joomla version and CiviCRM 5.18.4.  The live environment is OK, the development environment is OK, but cron jobs are not running in the test environment.  The PHP log file gives these two errors:</p>
  
  <pre><code>[07-Nov-2019 19:05:30 Europe/London] PHP Warning:  ini_set(): A session is active. You cannot change the session module's ini settings at this time in &lt;joomla_root&gt;/libraries/joomla/session/handler/joomla.php on line 48
  [07-Nov-2019 19:05:30 Europe/London] PHP Warning:  session_cache_limiter(): Cannot change cache limiter when headers already sent in &lt;joomla_root&gt;/libraries/joomla/session/handler/native.php on line 235
  </code></pre>
  
  <p>The command line is:</p>
  
  <pre><code>wget -q -t 1 'https://&lt;example.com&gt;/administrator/components/com_civicrm/civicrm/bin/cron.php?name=&lt;user&gt;&amp;pass=&lt;password&gt;&amp;key=&lt;key&gt;'
  </code></pre>
  
  <p>I've tried clearing the session table, but it hasn't helped.  Debugging is difficult - I've tried the error_log() function to track what is happening, but not very successfully; PHP doesn't always write to the log file.</p>
  
  <p>Can anyone suggest where I should look?  I hesitate to update the live environment until the test environment is working properly.</p>
  
Tags: <joomla><cron-job>
Title: cron jobs stopped working under Joomla 3.9.13 and CiviCRM 5.18.4
ThreadText: # cron jobs stopped working under Joomla 3.9.13 and CiviCRM 5.18.4
  
  (Asked by: username_0 on 2019-11-07)
  
  I am involved with three CiviCRM instances, a live one under LAMP, Joomla 3.9.13 and CiviCRM 5.18.2, a test one under LAMP, the same Joomla version and CiviCRM 5.18.4 and a development environment running under Windows 10, IIS, the same Joomla version and CiviCRM 5.18.4. The live environment is OK, the development environment is OK, but cron jobs are not running in the test environment. The PHP log file gives these two errors:
  
  ```
  [07-Nov-2019 19:05:30 Europe/London] PHP Warning:  ini_set(): A session is active. You cannot change the session module's ini settings at this time in <joomla_root>/libraries/joomla/session/handler/joomla.php on line 48
  [07-Nov-2019 19:05:30 Europe/London] PHP Warning:  session_cache_limiter(): Cannot change cache limiter when headers already sent in <joomla_root>/libraries/joomla/session/handler/native.php on line 235
  
  ```
  
  The command line is:
  
  ```
  wget -q -t 1 'https://<example.com>/administrator/components/com_civicrm/civicrm/bin/cron.php?name=<user>&pass=<password>&key=<key>'
  
  ```
  
  I've tried clearing the session table, but it hasn't helped. Debugging is difficult - I've tried the error\_log() function to track what is happening, but not very successfully; PHP doesn't always write to the log file.
  
  Can anyone suggest where I should look? I hesitate to update the live environment until the test environment is working properly.
  
  **Tags:** joomla, cron-job
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2019-11-13. Score: 1
  
  I had difficulties getting cron.php to log progress and, as the issue was on a remote server would have difficulties debugging. As a consequence, I rolled the CiviCRM installation and database back to backups taken before the issue occurred, and then reinstalled the CiviCRM upgrades. The cron job now appears to be working. Fortunately, the problem was on a test system so it didn't matter about any recent work. Had it been on a live system, it the issue would have been much more serious.
  
  
  ---
  
  ### Answer by username_1 on 2020-01-10. Score: 0
  
  It doesn't answer why it stopped working, but have you tried using [`cv`](https://github.com/civicrm/cv) in your cron job? Works for me.
  
  > **Comments:**
  > **username_0**: I haven't yet, but it is worth investigating.  
  > **username_0**: I started using cv, and it seems to be working better.  
  
  ---
  
  