Using Cron to trigger php jobs
Start by accessing the root directory with your preferred file browser.
- In Joomla, browse to /administrator/components/com_civicrm/
- Open the civicrm.settings.php file for editing.
- Find the following line (maybe line 284):
define( 'CIVICRM_SITE_KEY', '26ef1a41b2f4a1246b58b345e4b28bab');
This is your automatically created site key, that you'll need in the next step.
Log on to your web hosts cPanel.
- Click the Cron Jobs icon.
- If it's not available you'll need to contact your web host.
- In the Add a New Cron Job section, configure the schedule (e.g. */15 * * * *
- In the Command: box, enter the following command and click the Add New Cron Job button.
curl --silent --compressed 'https://yoursite.org/administrator/components/com_civicrm/civicrm/bin/cron.php?name=username&pass=password&key=26ef1a41b2f4a1246b58b345e4b28bab' > /dev/null 2>&1
Name is your Joomla super admin username, and pass is the user's password. The --silent option stops the progress bar appearing, and the --compressed option allows curl to request a compressed response, neither are necessary for the cron job to work and the compressed option may not be supported on your host. The > /dev/null 2>&1 option sends the output to a null file, preventing an email being sent, and was required by my host, but might not be needed for your host.
Managing CiviCRM jobs
Now that your cron job has been created, you can manage various CiviCRM jobs.
- Go to Administer > System Settings > Schedule Jobs.
- At your discretion, you might want to enable the following jobs.
- Clean-up temp data and files (Hourly)
- Disable expired relationships (Daily)
- Fetch bounces (Hourly)
- Geocode and parse addresses (Daily)
- Process inbound e-mails (Hourly)
- Process Survey Respondents (Always)
- Rebuild Smart Group Cache (Always)
- Send Scheduled Mailings (Always)
- Send Scheduled Reminders (Daily)
- Update Participant Statuses (Always)
- Validate Email Address from Mailings. (Daily)
Thanks for visiting.