Skip to content

CIVIMM-423: Fix scheduled job api_version and parameters format#7

Merged
erawat merged 1 commit intomasterfrom
CIVIMM-423-fix-scheduled-job-config
Jan 22, 2026
Merged

CIVIMM-423: Fix scheduled job api_version and parameters format#7
erawat merged 1 commit intomasterfrom
CIVIMM-423-fix-scheduled-job-config

Conversation

@erawat
Copy link
Member

@erawat erawat commented Jan 19, 2026

Summary

  • Add missing api_version field to scheduled job definition (fixes "Unknown api version" error)
  • Fix parameters format from URL-encoded (&) to newline-separated (CiviCRM requirement)

Before

  • Job failed with "Unknown api version" error
  • Parameters used & separator which CiviCRM doesn't accept

After

  • Job runs successfully
  • Parameters properly formatted as key=value on separate lines

Technical Details

// Before
'parameters' => 'processor_type=all&batch_size=250',

// After
'api_version' => 3,
'parameters' => "processor_type=all\nbatch_size=250",

@gemini-code-assist
Copy link

Summary of Changes

Hello @erawat, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves critical issues preventing a scheduled job from executing successfully. It ensures the job definition includes the required api_version and correctly formats the job parameters according to CiviCRM's specifications, allowing the job to run without errors.

Highlights

  • Missing API Version: Added the api_version field set to 3 to the scheduled job definition, resolving an "Unknown api version" error that prevented the job from running.
  • Parameters Format Correction: Corrected the parameters format for the scheduled job from URL-encoded (&) to newline-separated (\n), which is a specific requirement for CiviCRM to properly parse job parameters.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly fixes a failing scheduled job by adding the required api_version and correcting the format of the parameters string. The changes are accurate and address the issues described. I've added one suggestion to improve maintainability by removing parameters that are already set to their default values in the API, which would make the configuration cleaner and more robust to future changes.

@erawat erawat force-pushed the CIVIMM-423-fix-scheduled-job-config branch from 1580caf to 20337de Compare January 22, 2026 12:02
@erawat erawat merged commit cf725ac into master Jan 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants