CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Cron Job problems
Pages: 1 [2] 3

Author Topic: Cron Job problems  (Read 23516 times)

usr238496

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 0
  • CiviCRM version: latest
  • CMS version: joomla2.5
  • PHP version: 5 something
Re: Cron Job problems
July 09, 2012, 01:15:50 pm
# did you move your site recently?
# can you look in: /administrator/components/com_civicrm/civicrm/civicrm.config.php -- and confirm that the location is correct?

Yes I moved the site recently
civicrm.config.php is just a single line with a require_once of civicrm.settings.php, both files are fine.

My site is on a subdomain, not sure if that could have something to do with it or not, but thouht might worth a mention
You did not answer the verification questions correctly - sigh

usr238496

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 0
  • CiviCRM version: latest
  • CMS version: joomla2.5
  • PHP version: 5 something
Re: Cron Job problems
July 09, 2012, 01:34:29 pm
After making crawdaddyFL changes, I now get a blank screen when trying to pull the civicrm/bin/cron.php...... URL, so the jtrigger error appears to be fixed.

However, after create a test mailing and scheduling it for instant sending, on going to the bin/crop.php URL (it returns blank, not sure if this is a good or bad sign). But when I go to the mailing page, my test mailing reports as not being started.


« Last Edit: July 09, 2012, 01:56:50 pm by usr238496 »
You did not answer the verification questions correctly - sigh

usr238496

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 0
  • CiviCRM version: latest
  • CMS version: joomla2.5
  • PHP version: 5 something
Re: Cron Job problems
July 09, 2012, 03:02:26 pm
ok, it turns out things were not sorted at all :(

Point 1: from crawdaddy was causing me issues, by changing to
Code: [Select]
$joomlaBase = dirname(dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))))).'/';
10 or so lines down this causes me issues here with a double slash
Code: [Select]
    require $joomlaBase . '/libraries/import.php';
   require $joomlaBase . '/libraries/joomla/environment/uri.php';
    require $joomlaBase . '/configuration.php';

On stepping through the code, I get to line 10 in /root/libraries/joomla/environment/uri.php

Code: [Select]
defined('JPATH_PLATFORM') or die;

which not being set, is killing the page.
That can be "fixed" by (which appears to be the same thing in my tests
Code: [Select]
if(!defined('JPATH_PLATFORM') && defined('JPATH_LIBRARIES')) {
define('JPATH_PLATFORM', JPATH_LIBRARIES);
}

« Last Edit: July 09, 2012, 03:14:04 pm by usr238496 »
You did not answer the verification questions correctly - sigh

usr238496

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 0
  • CiviCRM version: latest
  • CMS version: joomla2.5
  • PHP version: 5 something
Re: Cron Job problems
July 09, 2012, 03:33:08 pm
Ok, so I can now confirm the bin/cron.php file runs to completion.

But still when I go to the Scheduled and Sent Mailings page, the mailing has not started to send.

You did not answer the verification questions correctly - sigh

usr238496

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 0
  • CiviCRM version: latest
  • CMS version: joomla2.5
  • PHP version: 5 something
Re: Cron Job problems
July 10, 2012, 06:39:06 am
Anyone got any ideas?
You did not answer the verification questions correctly - sigh

usr238496

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 0
  • CiviCRM version: latest
  • CMS version: joomla2.5
  • PHP version: 5 something
Re: Cron Job problems
July 10, 2012, 07:04:38 am
ok, so another day, another step further

civicrm/CRM/Core/JobManager.php
public function execute( $auth = true )

I followed the code to here and the $job "Send Scheduled Mailings" was always set to $job->is_active= false;

Forcing this to true and the mailings were sent :D

So I guess my problem is, why is this set to false, when I am forcing the mailings to send by going to the bin/cron.php URL?
You did not answer the verification questions correctly - sigh

usr238496

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 0
  • CiviCRM version: latest
  • CMS version: joomla2.5
  • PHP version: 5 something
Re: Cron Job problems
July 10, 2012, 08:46:12 am
and we are now fixed

Administer > System settings > scheduled jobs

Send scheduled mails was set to disabled, probably explains why they wouldn't send.

The CLI cron does not work, but I can call
wget http://.....bin/cron.php
and things get fired.


What a bloody palaver, but we are there. So all good
You did not answer the verification questions correctly - sigh

EdP

  • I post frequently
  • ***
  • Posts: 260
  • Karma: 7
  • CiviCRM version: 4.4
  • CMS version: Joomla 2.5.x
Re: Cron Job problems
July 12, 2012, 08:25:47 am
For what it's worth, v 4.1.5 and/or the reinstallation of everything as part of installing it appears to have fixed the problem for me.

effusing

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.3.3
  • CMS version: Joomla 2.5.11
  • MySQL version: 5.1
  • PHP version: 5.3.8
Re: Cron Job problems
July 12, 2012, 01:31:25 pm
Lobo,

FYI, I applied the patch from fisheye2.atlassian.com/changelog/CiviCRM?cs=41430

it works if I edit the two files in place.

However when I set "Settings - Upload Directories" php directory to /home/doman/public_html/templates/civicrm/
and place the 2 modified files there, then I upload edited files from this location I get this error:
Fatal error: Cannot redeclare class CRM_Utils_System_Joomla in /home/domain/public_html/templates/civicrm/CRM/Utils/System/Joomla.php on line 573 when I browse here:
domain.org/administrator/?option=com_civicrm&task=civicrm/admin/job&reset=1

Just an FYI in case it's important for dev. purposes.



Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Cron Job problems
July 12, 2012, 02:26:13 pm

thanx for the fyi :)

not sure why u get that errror, but hopefully this forum topic will be useful to other folks and we could figure out hat and why

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

zesgar

  • I post occasionally
  • **
  • Posts: 107
  • Karma: 2
  • CiviCRM version: 4.3.4
  • CMS version: Joomla 2.5
Re: Cron Job problems
July 19, 2012, 08:06:26 am
has this been submitted as a bug and official patch done yet?  I think it maybe what is causing my problems on generating receipts.  http://forum.civicrm.org/index.php/topic,25176.msg106280.html#msg106280

nzampella

  • I post occasionally
  • **
  • Posts: 61
  • Karma: 2
  • CiviCRM version: 4.5.3
  • CMS version: Joomla 3.3.6
  • MySQL version: 5.5.36
  • PHP version: 5.4.31
Re: Cron Job problems
July 27, 2012, 08:13:06 am
Haven't checked the forum for a while, and this topic definitely helped me with the CRON job not kicking off the scheduled jobs.

Applied the patches as listed here: fisheye2.atlassian.com/changelog/CiviCRM?cs=41430 directly to the files, and then watched the CRON job kick off the hourly jobs for the first time since I installed 4.1.x .

Thanks to all who researched and found the problem.


crawdaddyFL

  • I’m new here
  • *
  • Posts: 11
  • Karma: 2
  • CiviCRM version: 4.1.3
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.1.63
  • PHP version: 5.2.17
Re: Cron Job problems
August 01, 2012, 01:17:27 pm
For those with the "PHP Fatal error:  Class 'JDispatcher' not found" problem running cron jobs via php-cli with Joomla 2.5.6:

Adding the line with the arrow to CRM/Utils/System/Joomla.php works for me.   

Code: [Select]
  function loadBootStrap($params = array(

 ...

    // Get the framework.
    require $joomlaBase . '/libraries/import.php';
-->    require $joomlaBase . '/libraries/joomla/event/dispatcher.php';
    require $joomlaBase . '/libraries/joomla/environment/uri.php';
    require $joomlaBase . '/configuration.php';
 

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Cron Job problems
August 01, 2012, 02:24:12 pm

I patched 4.2 with the above fix

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

crawdaddyFL

  • I’m new here
  • *
  • Posts: 11
  • Karma: 2
  • CiviCRM version: 4.1.3
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.1.63
  • PHP version: 5.2.17
Re: Cron Job problems
August 01, 2012, 02:35:38 pm
Thanks Lobo.

Pages: 1 [2] 3
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Cron Job problems

This forum was archived on 2017-11-26.