Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-18765

Include suggestion(s) for CiviCRM cron job command

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      User and Admin Doc
    • Funding Source:
      Needs Funding

      Description

      In addtion to making the cron setup documentation less "developerish" (CRM-18057)
      https://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs

      It would be helpful to provide an admin user with an example or a suggestion of what the correct cron command would be. This could be located on the Administer - System Settings - CMS Database Integration page as we do on the Drupal platform for the CiviCRM/Views integration configuration that belongs in the settings.php file.

      1. Add a section to the page "CiviCRM Cron Settings"
      2. Only show information appropriate to the CMS platform in use (i.e. do not show how to invoke cron via drush when platform is Wordpress or Joomla)
      3. Infer as much information as possible from CiviCRM settings, CMS configuration, and the hosting environment so as to display paths and settings correct and specific to the customer's environment
      4. Display several appropriate alternative methods for invoking cron, in the order of preference: php cli, wget and CMS-specific invocation (drush or wp-cli)

      Example

      CiviCRM Cron Settings
      CiviCRM's functionality depends on periodically running a number of tasks in the background, such as updating membership statuses or delivering messages through CiviMail, through your hosting provider's job scheduling facility (sometimes referred to as a "cron job"). Your site administrator or hosting provider should set up running of CiviCRM scheduled jobs based on one of the methods below. Replace user names, passwords and other information with the appropriate values for your environment. For additional information see https://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs

      Run scheduled jobs via PHP cli:

      /path/to/php /path/to/civcrm/module/bin/cli.php -s site -u user -p password -e Job -a execute
      

      Run scheduled jobs via wget:

      wget -O - -q -t 1 'http://[SITEROOT]/sites/all/modules/civicrm/bin/cron.php?job=update_greeting&ct=Individual&gt=email_greeting&name=username&pass=password&key=site-key'

      Run scheduled jobs via drush:

      /path/to/drush -r /path/to/webroom -l https://example.org civicrm-api -u civicrm.cron job.execute

      Wherever possible, strings like "/path/to/civicrm" would be replaced with the values specific to the site being configured, such as $civicrm_root from civicrm.settings.php

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                axon-obriend Dan O'Brien
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: