Skip to content

Update project cleanup schedule to run every 4 hours#5381

Merged
saara-tyagi27 merged 2 commits into
GoogleCloudPlatform:developfrom
saara-tyagi27:update-run-schedule
Mar 23, 2026
Merged

Update project cleanup schedule to run every 4 hours#5381
saara-tyagi27 merged 2 commits into
GoogleCloudPlatform:developfrom
saara-tyagi27:update-run-schedule

Conversation

@saara-tyagi27

Copy link
Copy Markdown
Contributor

Summary

Updates the daily_project_cleanup_schedule module to execute every 4 hours instead of once per day. The new cron expression 30 3-23/4 * * * increases the frequency of resource cleanup to prevent accumulation of orphaned resources while specifically ensuring that the original 11:30 PM (23:30) slot is maintained.

The job will now run at the following times:

03:30, 07:30, 11:30, 15:30, 19:30, and 23:30.

Note

The use of the 3-23/4 range provides a 3-hour offset from midnight (23(mod4)=3), which is mathematically required to ensure the job hits the 11:00 PM hour while maintaining a consistent 4-hour interval.

@saara-tyagi27 saara-tyagi27 added the release-chore To not include into release notes label Mar 23, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 enhances resource management by significantly increasing the frequency of the project cleanup process. By adjusting the execution schedule from once a day to every four hours, the system will more proactively identify and remove orphaned resources, thereby minimizing their accumulation and improving overall system hygiene.

Highlights

  • Project Cleanup Schedule Frequency: The daily_project_cleanup_schedule module's cron expression has been updated to run every 4 hours instead of daily. This change ensures the cleanup process executes at 03:30, 07:30, 11:30, 15:30, 19:30, and 23:30.
  • Orphaned Resource Prevention: The increased frequency of the cleanup schedule is intended to prevent the accumulation of orphaned resources by identifying and removing them more proactively throughout the day.
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.

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.

@LAVEEN LAVEEN left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. After merge , please cross check if the running tests which runs at midnight doesn't get impacted as TTL is in place.

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

Copy link
Copy Markdown
Contributor

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 updates the project cleanup schedule to run every 4 hours, which is a sensible change to prevent the accumulation of orphaned resources. The new cron expression 30 3-23/4 * * * correctly schedules the job as intended. My review includes a suggestion to improve the readability and maintainability of the cron expression by explicitly listing the hours, in line with the project's style guide.

Comment thread tools/cloud-build/provision/daily-cleanup.tf
@saara-tyagi27 saara-tyagi27 marked this pull request as ready for review March 23, 2026 11:27
@saara-tyagi27 saara-tyagi27 requested review from a team and samskillman as code owners March 23, 2026 11:27
@saara-tyagi27 saara-tyagi27 merged commit f65ba73 into GoogleCloudPlatform:develop Mar 23, 2026
16 of 77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-chore To not include into release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants