From e9e60a8cf8d84c0bffa3ba8f4ed7b7fd1d22430f Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 4 Dec 2015 21:57:16 -0500 Subject: [PATCH] CRM-17637 - Add scheduled job --- CRM/Upgrade/Incremental/sql/4.7.beta2.mysql.tpl | 8 +++++++- api/v3/Job.php | 1 + xml/templates/civicrm_data.tpl | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CRM/Upgrade/Incremental/sql/4.7.beta2.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.7.beta2.mysql.tpl index da64587e5d..803d4883d9 100644 --- a/CRM/Upgrade/Incremental/sql/4.7.beta2.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.7.beta2.mysql.tpl @@ -14,4 +14,10 @@ ALTER TABLE civicrm_contact ALTER COLUMN do_not_trade SET DEFAULT 0; -- CRM-17147 People with empty deceased-flag ('is null') get removed from recipient list of a mailing UPDATE civicrm_contact SET is_deceased = 0 WHERE is_deceased IS NULL; -ALTER TABLE civicrm_contact ALTER COLUMN is_deceased SET DEFAULT 0; \ No newline at end of file +ALTER TABLE civicrm_contact ALTER COLUMN is_deceased SET DEFAULT 0; + +-- CRM-17637 +INSERT INTO `civicrm_job` +( domain_id, run_frequency, last_run, name, description, api_entity, api_action, parameters, is_active ) +VALUES +( {$domainID}, 'Daily' , NULL, '{ts escape="sql" skip="true"}CiviCRM Update Check{/ts}', '{ts escape="sql" skip="true"}Checks for CiviCRM version updates. Important for keeping the database secure. Also sends anonymous usage statistics to civicrm.org to to assist in prioritizing ongoing development efforts.{/ts}', 'job', 'version_check', NULL, 1); \ No newline at end of file diff --git a/api/v3/Job.php b/api/v3/Job.php index 10eb30aadc..c68c9b9140 100644 --- a/api/v3/Job.php +++ b/api/v3/Job.php @@ -648,4 +648,5 @@ function civicrm_api3_job_group_rebuild($params) { function civicrm_api3_job_version_check() { $vc = new CRM_Utils_VersionCheck(); $vc->fetch(); + return civicrm_api3_create_success(); } diff --git a/xml/templates/civicrm_data.tpl b/xml/templates/civicrm_data.tpl index 99e32e9130..1177767786 100644 --- a/xml/templates/civicrm_data.tpl +++ b/xml/templates/civicrm_data.tpl @@ -1619,6 +1619,7 @@ INSERT INTO `civicrm_contact_type` INSERT INTO `civicrm_job` ( domain_id, run_frequency, last_run, name, description, api_entity, api_action, parameters, is_active ) VALUES + ( @domainID, 'Daily' , NULL, '{ts escape="sql" skip="true"}CiviCRM Update Check{/ts}', '{ts escape="sql" skip="true"}Checks for CiviCRM version updates. Important for keeping the database secure. Also sends anonymous usage statistics to civicrm.org to to assist in prioritizing ongoing development efforts.{/ts}', 'job', 'version_check', NULL, 1), ( @domainID, 'Always' , NULL, '{ts escape="sql" skip="true"}Send Scheduled Mailings{/ts}', '{ts escape="sql" skip="true"}Sends out scheduled CiviMail mailings{/ts}', 'job', 'process_mailing', NULL, 0), ( @domainID, 'Hourly' , NULL, '{ts escape="sql" skip="true"}Fetch Bounces{/ts}', '{ts escape="sql" skip="true"}Fetches bounces from mailings and writes them to mailing statistics{/ts}', 'job', 'fetch_bounces', NULL, 0), ( @domainID, 'Hourly' , NULL, '{ts escape="sql" skip="true"}Process Inbound Emails{/ts}', '{ts escape="sql" skip="true"}Inserts activity for a contact or a case by retrieving inbound emails from a mail directory{/ts}', 'job', 'fetch_activities', NULL, 0), -- 2.25.1