public $submitOnce = TRUE;
public function preProcess() {
-
parent::preProcess();
$this->setContext();
- $this->setTitle(ts('Manage - Scheduled Jobs'));
+ if ($this->_action == CRM_Core_Action::DELETE) {
+ $this->setTitle(ts('Delete Scheduled Job'));
+ }
+ elseif ($this->_action == CRM_Core_Action::ADD) {
+ $this->setTitle(ts('New Scheduled Job'));
+ }
+ elseif ($this->_action == CRM_Core_Action::UPDATE) {
+ $this->setTitle(ts('Edit Scheduled Job'));
+ }
+ elseif ($this->_action == CRM_Core_Action::VIEW) {
+ $this->setTitle(ts('Execute Scheduled Job'));
+ }
+
+ CRM_Utils_System::appendBreadCrumb([
+ [
+ 'title' => ts('Administer CiviCRM'),
+ 'url' => CRM_Utils_System::url('civicrm/admin', 'reset=1'),
+ ],
+ [
+ 'title' => ts('Scheduled Jobs'),
+ 'url' => CRM_Utils_System::url('civicrm/admin/job', 'reset=1'),
+ ],
+ ]);
if ($this->_id) {
$refreshURL = CRM_Utils_System::url('civicrm/admin/job/edit',
* Finally it calls the parent's run method.
*/
public function run() {
- // set title and breadcrumb
CRM_Utils_System::setTitle(ts('Settings - Scheduled Jobs'));
- $breadCrumb = [
+ CRM_Utils_System::appendBreadCrumb([
[
- 'title' => ts('Scheduled Jobs'),
- 'url' => CRM_Utils_System::url('civicrm/admin',
- 'reset=1'
- ),
+ 'title' => ts('Administer CiviCRM'),
+ 'url' => CRM_Utils_System::url('civicrm/admin', 'reset=1'),
],
- ];
- CRM_Utils_System::appendBreadCrumb($breadCrumb);
+ ]);
$this->_id = CRM_Utils_Request::retrieve('id', 'String',
$this, FALSE, 0
| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
-{* This template is used for adding/configuring Scheduled Jobs. *}
-<h3>{if $action eq 1}{ts}New Scheduled Job{/ts}{elseif $action eq 2}{ts}Edit Scheduled Job{/ts}{elseif $action eq 4}{ts}Execute Scheduled Job{/ts}{else}{ts}Delete Scheduled Job{/ts}{/if}</h3>
+{* Edit/Run Scheduled Jobs *}
<div class="crm-block crm-form-block crm-job-form-block">
- <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
{if $action eq 8}
<div class="messages status no-popup">
{ts 1=$jobName}Are you sure you would like to execute %1 job?{/ts}
</div>
{else}
+ <div class="help">
+ {capture assign=docUrlText}{ts}Job parameters and command line syntax documentation{/ts}{/capture}
+ {docURL page="user/initial-set-up/scheduled-jobs" text=$docUrlText}
+ </div>
<table class="form-layout-compressed">
<tr class="crm-job-form-block-name">
<td class="label">{$form.name.label}</td><td>{$form.name.html}</td>
| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
-{capture assign=docUrlText}{ts}(Job parameters and command line syntax documentation...){/ts}{/capture}
-{capture assign=runAllURL}{crmURL p='civicrm/admin/runjobs' q="reset=1"}{/capture}
-<div class="help">
- {ts 1=$runAllURL}You can configure scheduled jobs (cron tasks) for your CiviCRM installation. For most sites, your system administrator should set up one or more 'cron' tasks to run the enabled jobs. However, you can also <a href="%1">run all scheduled jobs manually</a>, or run specific jobs from this screen (click 'more' and then 'Execute Now').{/ts} {docURL page="sysadmin/setup/jobs" text=$docUrlText}
-</div>
{if $action eq 1 or $action eq 2 or $action eq 8 or $action eq 4}
{include file="CRM/Admin/Form/Job.tpl"}
{else}
-
-<div class="crm-content-block crm-block">
-{if $rows}
-
+ {capture assign=docUrlText}{ts}(How to setup cron on the command line...){/ts}{/capture}
+ {capture assign=runAllURL}{crmURL p='civicrm/admin/runjobs' q="reset=1"}{/capture}
+ <div class="help">
+ {ts}CiviCRM relies on a number of scheduled jobs that run automatically on a regular basis. These jobs keep data up-to-date and perform other important tasks.{/ts}
+ {ts 1=$runAllURL}For most sites, your system administrator should set up one or more 'cron' tasks to run the enabled jobs. You can also <a href="%1">run all scheduled jobs manually</a>, or run specific jobs from this screen.{/ts} {docURL page="sysadmin/setup/jobs" text=$docUrlText}
+ </div>
+ <div class="crm-content-block crm-block">
+ {if $rows}
{if $action ne 1 and $action ne 2}
<div class="action-link">
{crmButton p='civicrm/admin/job/add' q="action=add&reset=1" id="newJob" icon="plus-circle"}{ts}Add New Scheduled Job{/ts}{/crmButton}