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

Add field to scheduled job form to specify first/next run

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: Unscheduled
    • Fix Version/s: 4.7
    • Component/s: Core CiviCRM
    • Labels:
    • Documentation Required?:
      User and Admin Doc
    • Funding Source:
      Contributed Code

      Description

      I would like to add a new field to CRM_Admin_Form_Job that would let the admin/end-user specify the first/next run of the scheduled job. With the additional run frequencies proposed in CRM-17669, this would give much improved flexibility on when jobs are run.

      My proposed implementation...

      • Add the field in CRM_Admin_Form_Job::buildQuickForm(). The label for the field would change based on whether it's a new or existing job.
      • Add the field to CRM_Admin_Form_Job.tpl with description explaining it's use.
      • In CRM_Admin_Form_Job::postProcess(), if the field has been provided, use CRM_Core_BAO_Setting::setItem() to save the value.
      • In CRM_Core_ScheduledJob::needsRunning(), use CRM_Core_BAO_Setting::getItem to check if there is a first/next run scheduled for the job. If there is, determine if the job needs to run based on that (and remove setting if so), otherwise fall through to existing check.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              konadave David Reedy Jr
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: