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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.1 Release Testing (Moderator: Kurund Jalmi) »
  • How to setup the new scheduler jobs
Pages: [1]

Author Topic: How to setup the new scheduler jobs  (Read 3485 times)

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
How to setup the new scheduler jobs
December 29, 2011, 12:19:47 pm
How to setup the new scheduler jobs in civicrm/admin/job?reset=1?
What is the cron command (syntax) needed to start these jobs?
Is there some documentation in civicrm.org about how to use these new 'cron' process?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How to setup the new scheduler jobs
December 30, 2011, 12:27:43 pm
You can find some documentation here: http://wiki.civicrm.org/confluence/display/CRM/Consolidated+CiviCRM+Cron

Kurund
Found this reply helpful? Support CiviCRM

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: How to setup the new scheduler jobs
December 30, 2011, 03:31:38 pm
Thanks for the link. I read this and followed the links in the text.
I still have questions.

Is cli.php in civivrm/bin the script that cron has to start?
When I do that I have a "Failed opening required 'civicrm.config.php" error. Also when using name pass and key.
I am confused because the documentation speaks about starting the script without name, pass and key.
Maybe I am missing the correct syntax?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How to setup the new scheduler jobs
January 04, 2012, 09:37:14 pm
Updated wiki check: http://wiki.civicrm.org/confluence/display/CRMDOC41/Command-line+Script+Configuration

Thanks
Kurund
Found this reply helpful? Support CiviCRM

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: How to setup the new scheduler jobs
January 05, 2012, 03:43:29 am
Sorry, also after reading the new text in the wiki, I still do not understand how I should use it.

Do I have to make a cronjob for each scheduled job I want to use?
Or is there a (per minute...) cronjob script that for all scheduled jobs?
And what is the correct script?
The wiki example does not have a key, I don't need  the key?

In CiviCRM / bin I tried the example from the wiki:
Code: [Select]
php cli.php -e job -a update_greeting --ct=Individual --gt=email_greeting
and also
php cli.php -e job -a process_mailing
.

For both the result is the error message:

Code: [Select]
Warning: require_once (civicrm.config.php): failed to open stream: No such file or directory in / home/public_html/drupal-7/sites/all/modules/civicrm/bin/cli . php on line 129

Fatal error: require_once (): Failed opening required 'civicrm.config.php' (include_path ='.:/ usr / local / lib / php ') in / home/public_html/drupal-7 / sites / all / modules / CiviCRM / bin / cli.php on line 129

The required civicrm.config.php is in the civicrm_root (setting in civicrm.settings.php).




msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: How to setup the new scheduler jobs
January 30, 2012, 01:15:49 pm
Thanks for http://wiki.civicrm.org/confluence/display/CRMDOC41/Managing+Scheduled+Jobs this helps a lot.

In cron I have the command
Code: [Select]
php /home/domain1/domains/mvowebsites.nl/public_html/drupal-7/sites/all/modules/civicrm/bin/cli.php -u drupaluser -p password -e Job -a executeThis works fine: the scheduled jobs I switched on are working: mass mail is send and the log of the scheduled jobs gives the starting and finishing execution results.

Problem is in drupal logs. On each cron command (each minute) there is
Code: [Select]
Notice: Undefined index: SERVER_SOFTWARE in require_once() (line 13 van /home/domain1/domains/mvowebsites.nl/public/drupal-7/includes/mail.inc).
Location: http://www.mvowebsites.nl/home/domain1/domains/mvowebsites.nl/public_html/drupal-7/sites/all/modules/civicrm/bin/cli.php?/home/mvwbsts/domains/mvowebsites.nl/public_html/drupal-7/sites/all/modules/civicrm/bin/cli.php
Searching this forum and the internet, I cannot find the reason. 

co-operatives uk

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal 7.15
  • MySQL version: 5
  • PHP version: 5
Re: How to setup the new scheduler jobs
January 31, 2012, 01:45:50 am
I'm trying to trigger the jobs by URL and getting no success - cron.php doesn't exist any more, so am I right in thinking the instructions for this haven't been written yet?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How to setup the new scheduler jobs
January 31, 2012, 02:44:46 am
Quote
I'm trying to trigger the jobs by URL and getting no success - cron.php doesn't exist any more, so am I right in thinking the instructions for this haven't been written yet?
This are the instructions for managing scheduled jobs / new cron stuff: http://wiki.civicrm.org/confluence/display/CRMDOC41/Managing+Scheduled+Jobs

HTH
Kurund
« Last Edit: January 31, 2012, 03:30:40 am by Kurund Jalmi »
Found this reply helpful? Support CiviCRM

co-operatives uk

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal 7.15
  • MySQL version: 5
  • PHP version: 5
Re: How to setup the new scheduler jobs
January 31, 2012, 02:49:40 am
Yes, I know. And the section on doing it through a URL refers to bin/cron.php which doesn't exist in 4.1. I was checking whether they hadn't been updated, or if I'm missing something.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How to setup the new scheduler jobs
January 31, 2012, 05:05:25 am
cron.php does exists in bin folder, check http://svn.civicrm.org/civicrm/branches/v4.1/bin/

Can you download and check latest beta

Kurund
Found this reply helpful? Support CiviCRM

co-operatives uk

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal 7.15
  • MySQL version: 5
  • PHP version: 5
Re: How to setup the new scheduler jobs
January 31, 2012, 01:45:56 pm
Ah fantastic! That's got it and it works perfectly. Thanks!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.1 Release Testing (Moderator: Kurund Jalmi) »
  • How to setup the new scheduler jobs

This forum was archived on 2017-11-26.